home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-09-29 | 21.1 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: MyJGNE.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Thu Sep 29 19:44:37 1994, modified Thu Sep 29 19:44:37 1994, creator Think C, type ASCII, 20868 bytes "MyJGNE.c" , at 0x5204 450 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 4d 79 4a 47 4e 45 | 2e 63 00 00 00 00 00 00 |..MyJGNE|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 51 84 00 | 00 01 c2 aa b1 01 e5 aa |.....Q..|........|
|00000060| b1 01 e5 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3d 6e 00 00 |........|....=n..|
|00000080| 2f 2a 0d 09 4d 79 4a 47 | 4e 45 2e 63 0d 09 0d 09 |/*..MyJG|NE.c....|
|00000090| 57 72 69 74 74 65 6e 20 | 62 79 20 4b 65 6e 20 57 |Written |by Ken W|
|000000a0| 6f 72 6c 65 79 2c 20 30 | 36 2f 32 37 2f 39 34 2c |orley, 0|6/27/94,|
|000000b0| 20 75 73 69 6e 67 20 53 | 79 6d 61 6e 74 65 63 20 | using S|ymantec |
|000000c0| 54 68 69 6e 6b 20 43 20 | 37 2e 30 20 28 54 50 4d |Think C |7.0 (TPM|
|000000d0| 20 36 2e 30 2e 31 29 2e | 0d 09 43 6f 70 79 72 69 | 6.0.1).|..Copyri|
|000000e0| 67 68 74 20 31 39 39 34 | 2e 20 41 6c 6c 20 52 69 |ght 1994|. All Ri|
|000000f0| 67 68 74 73 20 52 65 73 | 65 72 76 65 64 2e 0d 09 |ghts Res|erved...|
|00000100| 41 4f 4c 20 4b 4e 45 77 | 6f 72 6c 65 79 0d 09 69 |AOL KNEw|orley..i|
|00000110| 6e 74 65 72 6e 65 74 20 | 4b 4e 45 77 6f 72 6c 65 |nternet |KNEworle|
|00000120| 79 40 61 6f 6c 2e 63 6f | 6d 0d 09 0d 09 46 65 65 |y@aol.co|m....Fee|
|00000130| 6c 20 66 72 65 65 20 74 | 6f 20 75 73 65 20 74 68 |l free t|o use th|
|00000140| 69 73 20 63 6f 64 65 20 | 69 6e 20 61 20 70 72 6f |is code |in a pro|
|00000150| 6a 65 63 74 20 6f 66 20 | 79 6f 75 72 20 6f 77 6e |ject of |your own|
|00000160| 2c 20 62 75 74 20 67 69 | 76 65 20 6d 65 20 70 72 |, but gi|ve me pr|
|00000170| 6f 70 65 72 0d 09 63 72 | 65 64 69 74 20 69 6e 20 |oper..cr|edit in |
|00000180| 79 6f 75 72 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |your doc|umentati|
|00000190| 6f 6e 20 6f 72 20 61 62 | 6f 75 74 20 62 6f 78 2e |on or ab|out box.|
|000001a0| 20 20 46 65 65 6c 20 66 | 72 65 65 20 74 6f 20 64 | Feel f|ree to d|
|000001b0| 69 73 74 72 69 62 75 74 | 65 20 74 68 69 73 0d 09 |istribut|e this..|
|000001c0| 63 6f 64 65 20 69 6e 20 | 69 74 73 20 65 6e 74 69 |code in |its enti|
|000001d0| 72 65 74 79 20 74 6f 20 | 61 6e 79 6f 6e 65 2c 20 |rety to |anyone, |
|000001e0| 62 75 74 20 6e 65 76 65 | 72 20 64 6f 20 73 6f 20 |but neve|r do so |
|000001f0| 77 69 74 68 6f 75 74 20 | 74 68 65 20 63 6f 70 79 |without |the copy|
|00000200| 72 69 67 68 74 0d 09 6e | 6f 74 69 63 65 20 61 62 |right..n|otice ab|
|00000210| 6f 76 65 20 6e 6f 72 20 | 77 69 74 68 6f 75 74 20 |ove nor |without |
|00000220| 69 74 73 20 61 63 63 6f | 6d 70 61 6e 79 69 6e 67 |its acco|mpanying|
|00000230| 20 66 69 6c 65 73 2e 20 | 20 54 68 69 73 20 63 6f | files. | This co|
|00000240| 64 65 20 69 73 20 4e 4f | 54 20 69 6e 0d 09 74 68 |de is NO|T in..th|
|00000250| 65 20 70 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 2e |e public| domain.|
|00000260| 20 20 55 73 65 20 6f 66 | 20 74 68 69 73 20 63 6f | Use of| this co|
|00000270| 64 65 20 69 6e 20 61 20 | 63 6f 6d 6d 65 72 63 69 |de in a |commerci|
|00000280| 61 6c 20 70 72 6f 64 75 | 63 74 20 72 65 71 75 69 |al produ|ct requi|
|00000290| 72 65 73 0d 09 6d 79 20 | 70 65 72 6d 69 73 73 69 |res..my |permissi|
|000002a0| 6f 6e 2e 20 20 49 20 61 | 6d 20 6e 6f 74 20 72 65 |on. I a|m not re|
|000002b0| 73 70 6f 6e 73 69 62 6c | 65 20 66 6f 72 20 61 6e |sponsibl|e for an|
|000002c0| 79 74 68 69 6e 67 20 74 | 68 61 74 20 6d 69 67 68 |ything t|hat migh|
|000002d0| 74 20 68 61 70 70 65 6e | 20 74 6f 0d 09 79 6f 75 |t happen| to..you|
|000002e0| 72 20 4d 61 63 20 6f 72 | 20 79 6f 75 72 20 64 61 |r Mac or| your da|
|000002f0| 74 61 20 61 73 20 61 20 | 72 65 73 75 6c 74 20 6f |ta as a |result o|
|00000300| 66 20 75 73 69 6e 67 20 | 74 68 69 73 20 63 6f 64 |f using |this cod|
|00000310| 65 2e 20 20 49 20 62 65 | 6c 69 65 76 65 20 74 68 |e. I be|lieve th|
|00000320| 69 73 0d 09 63 6f 64 65 | 20 69 73 20 73 74 61 62 |is..code| is stab|
|00000330| 6c 65 20 61 6e 64 20 77 | 69 6c 6c 20 6e 6f 74 20 |le and w|ill not |
|00000340| 63 61 75 73 65 20 61 6e | 79 20 64 61 6d 61 67 65 |cause an|y damage|
|00000350| 20 74 6f 20 61 6e 79 74 | 68 69 6e 67 2c 20 62 75 | to anyt|hing, bu|
|00000360| 74 20 75 73 65 20 69 74 | 0d 09 61 74 20 79 6f 75 |t use it|..at you|
|00000370| 72 20 6f 77 6e 20 72 69 | 73 6b 2e 0d 09 09 0d 09 |r own ri|sk......|
|00000380| 54 68 69 73 20 63 6f 64 | 65 20 69 6e 63 6f 72 70 |This cod|e incorp|
|00000390| 6f 72 61 74 65 73 20 27 | 53 68 6f 77 49 63 6f 6e |orates '|ShowIcon|
|000003a0| 46 61 6d 69 6c 79 27 20 | 62 79 20 50 61 74 72 69 |Family' |by Patri|
|000003b0| 63 6b 20 43 2e 20 42 65 | 61 72 64 20 61 6e 64 0d |ck C. Be|ard and.|
|000003c0| 09 6d 6f 64 69 66 69 65 | 64 20 62 79 20 4a 61 6d |.modifie|d by Jam|
|000003d0| 65 73 20 57 2e 20 57 61 | 6c 6b 65 72 2e 20 20 54 |es W. Wa|lker. T|
|000003e0| 68 69 73 20 70 69 65 63 | 65 20 6f 66 20 63 6f 64 |his piec|e of cod|
|000003f0| 65 0d 09 69 73 20 63 61 | 6c 6c 65 64 20 74 6f 20 |e..is ca|lled to |
|00000400| 64 69 73 70 6c 61 79 20 | 74 68 65 20 65 78 74 65 |display |the exte|
|00000410| 6e 73 69 6f 6e 27 73 20 | 69 63 6f 6e 20 61 74 20 |nsion's |icon at |
|00000420| 73 74 61 72 74 75 70 2e | 20 20 54 68 69 73 0d 09 |startup.| This..|
|00000430| 63 6f 64 65 20 77 61 73 | 20 62 61 73 65 64 20 6f |code was| based o|
|00000440| 6e 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 53 |n the or|iginal S|
|00000450| 68 6f 77 49 6e 69 74 20 | 62 79 20 50 61 75 6c 20 |howInit |by Paul |
|00000460| 4d 65 72 63 65 72 2c 20 | 44 61 72 69 6e 20 41 64 |Mercer, |Darin Ad|
|00000470| 6c 65 72 2c 20 50 61 75 | 6c 0d 09 53 6e 69 76 65 |ler, Pau|l..Snive|
|00000480| 6c 79 20 61 6e 64 20 53 | 74 65 76 65 20 43 61 70 |ly and S|teve Cap|
|00000490| 70 73 2e 20 20 54 68 65 | 73 65 20 61 72 65 20 74 |ps. The|se are t|
|000004a0| 68 65 20 67 75 79 73 20 | 74 6f 20 62 6c 61 6d 65 |he guys |to blame|
|000004b0| 20 66 6f 72 20 6f 75 72 | 20 73 74 61 72 74 75 70 | for our| startup|
|000004c0| 20 69 63 6f 6e 0d 09 70 | 61 72 61 64 65 73 2e 20 | icon..p|arades. |
|000004d0| 20 54 68 61 74 20 70 69 | 65 63 65 20 6f 66 20 63 | That pi|ece of c|
|000004e0| 6f 64 65 20 28 53 68 6f | 77 49 63 6f 6e 46 61 6d |ode (Sho|wIconFam|
|000004f0| 69 6c 79 2e 63 29 20 69 | 73 20 50 55 42 4c 49 43 |ily.c) i|s PUBLIC|
|00000500| 20 44 4f 4d 41 49 4e 2e | 20 20 49 20 6d 61 64 65 | DOMAIN.| I made|
|00000510| 0d 09 73 6f 6d 65 20 6d | 6f 64 69 66 69 63 61 74 |..some m|odificat|
|00000520| 69 6f 6e 73 20 74 6f 20 | 69 74 20 69 6e 20 6f 72 |ions to |it in or|
|00000530| 64 65 72 20 74 6f 20 75 | 73 65 20 69 74 20 77 69 |der to u|se it wi|
|00000540| 74 68 6f 75 74 20 61 6e | 79 20 67 6c 6f 62 61 6c |thout an|y global|
|00000550| 20 76 61 72 69 61 62 6c | 65 73 2e 0d 09 0d 09 54 | variabl|es.....T|
|00000560| 68 69 73 20 66 69 6c 65 | 20 69 6e 63 6c 75 64 65 |his file| include|
|00000570| 73 20 74 68 65 20 6d 61 | 69 6e 20 72 6f 75 74 69 |s the ma|in routi|
|00000580| 6e 65 20 77 68 69 63 68 | 20 69 6e 73 74 61 6c 6c |ne which| install|
|00000590| 73 20 74 68 65 20 66 69 | 6c 74 65 72 20 28 74 68 |s the fi|lter (th|
|000005a0| 65 20 6d 61 69 6e 0d 09 | 72 6f 75 74 69 6e 65 20 |e main..|routine |
|000005b0| 72 75 6e 73 20 61 74 20 | 73 79 73 74 65 6d 20 73 |runs at |system s|
|000005c0| 74 61 72 74 75 70 29 2c | 20 61 6e 64 20 74 68 65 |tartup),| and the|
|000005d0| 20 4d 79 54 61 73 6b 20 | 72 6f 75 74 69 6e 65 20 | MyTask |routine |
|000005e0| 77 68 69 63 68 20 69 73 | 20 74 68 65 0d 09 63 61 |which is| the..ca|
|000005f0| 6c 6c 69 6e 67 20 70 6f | 69 6e 74 20 6f 66 20 74 |lling po|int of t|
|00000600| 68 65 20 66 69 6c 74 65 | 72 20 72 6f 75 74 69 6e |he filte|r routin|
|00000610| 65 2e 20 20 41 6e 79 20 | 6f 74 68 65 72 20 72 6f |e. Any |other ro|
|00000620| 75 74 69 6e 65 73 20 69 | 6e 63 6c 75 64 65 64 20 |utines i|ncluded |
|00000630| 69 6e 0d 09 74 68 69 73 | 20 66 69 6c 65 20 61 72 |in..this| file ar|
|00000640| 65 20 63 61 6c 6c 65 64 | 20 62 79 20 4d 79 54 61 |e called| by MyTa|
|00000650| 73 6b 2e 0d 09 0d 09 54 | 68 69 73 20 63 6f 64 65 |sk.....T|his code|
|00000660| 20 73 65 74 73 20 61 20 | 63 6f 75 70 6c 65 20 6f | sets a |couple o|
|00000670| 66 20 74 68 65 20 66 69 | 65 6c 64 73 20 69 6e 20 |f the fi|elds in |
|00000680| 74 68 65 20 67 6c 6f 62 | 61 6c 20 64 61 74 61 20 |the glob|al data |
|00000690| 77 68 69 63 68 20 61 72 | 65 0d 09 61 63 63 65 73 |which ar|e..acces|
|000006a0| 73 65 64 20 61 6e 64 2f | 6f 72 20 6d 6f 64 69 66 |sed and/|or modif|
|000006b0| 69 65 64 20 62 79 20 6f | 74 68 65 72 20 63 6f 64 |ied by o|ther cod|
|000006c0| 65 20 6c 61 74 65 72 20 | 6f 6e 2e 20 20 54 68 65 |e later |on. The|
|000006d0| 20 27 43 50 6f 6e 27 20 | 66 69 65 6c 64 20 69 73 | 'CPon' |field is|
|000006e0| 20 73 65 74 20 74 6f 0d | 09 74 72 75 65 20 6f 72 | set to.|.true or|
|000006f0| 20 66 61 6c 73 65 20 64 | 65 70 65 6e 64 69 6e 67 | false d|epending|
|00000700| 20 6f 6e 20 77 68 65 74 | 68 65 72 20 6f 72 20 6e | on whet|her or n|
|00000710| 6f 74 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ot the p|referenc|
|00000720| 65 73 20 72 65 73 6f 75 | 72 63 65 20 69 6e 64 69 |es resou|rce indi|
|00000730| 63 61 74 65 73 0d 09 74 | 68 65 20 63 6f 6e 74 72 |cates..t|he contr|
|00000740| 6f 6c 20 70 61 6e 65 6c | 20 77 61 73 20 73 65 74 |ol panel| was set|
|00000750| 20 74 6f 20 27 6f 6e 27 | 20 6f 72 20 27 6f 66 66 | to 'on'| or 'off|
|00000760| 27 20 77 68 65 6e 20 6c | 61 73 74 20 63 6c 6f 73 |' when l|ast clos|
|00000770| 65 64 2e 20 20 54 68 65 | 0d 09 27 74 61 73 6b 49 |ed. The|..'taskI|
|00000780| 6e 73 74 61 6c 6c 65 64 | 27 20 66 69 65 6c 64 20 |nstalled|' field |
|00000790| 69 73 20 74 72 75 65 20 | 69 66 20 74 68 65 20 74 |is true |if the t|
|000007a0| 61 73 6b 20 77 61 73 20 | 69 6e 73 74 61 6c 6c 65 |ask was |installe|
|000007b0| 64 2c 20 66 61 6c 73 65 | 20 6f 74 68 65 72 77 69 |d, false| otherwi|
|000007c0| 73 65 2e 0d 09 0d 09 54 | 68 65 20 66 6f 6c 6c 6f |se.....T|he follo|
|000007d0| 77 69 6e 67 20 23 64 65 | 66 69 6e 65 73 20 61 72 |wing #de|fines ar|
|000007e0| 65 20 75 73 65 64 20 74 | 6f 20 69 64 65 6e 74 69 |e used t|o identi|
|000007f0| 66 79 20 69 63 6f 6e 73 | 20 74 68 61 74 20 61 72 |fy icons| that ar|
|00000800| 65 20 64 69 73 70 6c 61 | 79 65 64 20 77 68 65 6e |e displa|yed when|
|00000810| 0d 09 74 68 65 20 65 78 | 74 65 6e 73 69 6f 6e 20 |..the ex|tension |
|00000820| 69 73 20 72 75 6e 3a 0d | 09 0d 09 09 6b 49 63 6f |is run:.|....kIco|
|00000830| 6e 46 61 6d 69 6c 79 49 | 44 20 69 73 20 74 68 65 |nFamilyI|D is the|
|00000840| 20 72 65 73 6f 75 72 63 | 65 20 6e 75 6d 62 65 72 | resourc|e number|
|00000850| 20 6f 66 20 74 68 65 20 | 69 63 6f 6e 20 66 61 6d | of the |icon fam|
|00000860| 69 6c 79 20 6f 75 72 20 | 66 69 6e 61 6c 20 66 69 |ily our |final fi|
|00000870| 6c 65 20 77 69 6c 6c 0d | 09 09 09 62 65 20 75 73 |le will.|...be us|
|00000880| 69 6e 67 2e 20 20 54 68 | 65 20 6e 75 6d 62 65 72 |ing. Th|e number|
|00000890| 20 69 73 20 75 73 65 64 | 20 74 6f 20 73 65 6e 64 | is used| to send|
|000008a0| 20 74 6f 20 53 68 6f 77 | 49 6e 69 74 20 73 6f 20 | to Show|Init so |
|000008b0| 6f 75 72 20 69 63 6f 6e | 20 63 61 6e 20 62 65 0d |our icon| can be.|
|000008c0| 09 09 09 73 68 6f 77 6e | 20 69 6e 20 74 68 65 20 |...shown| in the |
|000008d0| 73 74 61 72 74 75 70 20 | 69 63 6f 6e 20 70 61 72 |startup |icon par|
|000008e0| 61 64 65 2e 0d 09 09 0d | 09 09 6b 58 49 63 6f 6e |ade.....|..kXIcon|
|000008f0| 49 44 20 69 73 20 74 68 | 65 20 72 65 73 6f 75 72 |ID is th|e resour|
|00000900| 63 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |ce numbe|r of the|
|00000910| 20 69 63 6f 6e 20 66 61 | 6d 69 6c 79 20 74 6f 20 | icon fa|mily to |
|00000920| 62 65 20 75 73 65 64 20 | 77 68 65 6e 20 74 68 65 |be used |when the|
|00000930| 72 65 20 77 61 73 0d 09 | 09 09 61 20 70 72 6f 62 |re was..|..a prob|
|00000940| 6c 65 6d 20 77 68 65 6e | 20 6c 6f 61 64 69 6e 67 |lem when| loading|
|00000950| 20 74 68 65 20 65 78 74 | 65 6e 73 69 6f 6e 2e 20 | the ext|ension. |
|00000960| 20 54 68 69 73 20 69 63 | 6f 6e 20 6c 6f 6f 6b 73 | This ic|on looks|
|00000970| 20 58 65 64 20 6f 75 74 | 2e 0d 09 09 0d 09 09 6b | Xed out|.......k|
|00000980| 4e 6f 41 63 74 69 6f 6e | 49 63 6f 6e 49 44 20 69 |NoAction|IconID i|
|00000990| 73 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 6e |s the re|source n|
|000009a0| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 69 63 6f |umber of| the ico|
|000009b0| 6e 20 66 61 6d 69 6c 79 | 20 74 6f 20 62 65 20 75 |n family| to be u|
|000009c0| 73 65 64 20 77 68 65 6e | 0d 09 09 09 74 68 65 20 |sed when|....the |
|000009d0| 70 61 74 63 68 20 69 73 | 20 6e 6f 74 20 6c 6f 61 |patch is| not loa|
|000009e0| 64 65 64 20 28 77 68 65 | 6e 20 74 68 65 20 63 6f |ded (whe|n the co|
|000009f0| 6e 74 72 6f 6c 20 70 61 | 6e 65 6c 20 69 73 20 73 |ntrol pa|nel is s|
|00000a00| 65 74 20 74 6f 20 22 6f | 66 66 22 29 2e 0d 09 0d |et to "o|ff")....|
|00000a10| 09 53 4f 20 57 48 41 54 | 27 53 20 41 20 4a 47 4e |.SO WHAT|'S A JGN|
|00000a20| 45 3f 0d 09 0d 09 09 54 | 68 65 20 4d 61 63 20 53 |E?.....T|he Mac S|
|00000a30| 79 73 74 65 6d 20 72 65 | 63 6f 67 6e 69 7a 65 73 |ystem re|cognizes|
|00000a40| 20 61 20 6c 6f 77 20 6d | 65 6d 6f 72 79 20 67 6c | a low m|emory gl|
|00000a50| 6f 62 61 6c 20 77 69 74 | 68 20 74 68 65 20 6e 61 |obal wit|h the na|
|00000a60| 6d 65 20 4a 47 4e 45 46 | 69 6c 74 65 72 2e 0d 09 |me JGNEF|ilter...|
|00000a70| 09 54 68 69 73 20 67 6c | 6f 62 61 6c 20 43 41 4e |.This gl|obal CAN|
|00000a80| 20 70 6f 69 6e 74 20 74 | 6f 20 61 20 72 6f 75 74 | point t|o a rout|
|00000a90| 69 6e 65 20 75 73 65 64 | 20 74 6f 20 22 66 69 6c |ine used| to "fil|
|00000aa0| 74 65 72 22 20 41 4c 4c | 20 65 76 65 6e 74 73 20 |ter" ALL| events |
|00000ab0| 74 68 61 74 20 61 72 65 | 0d 09 09 72 65 74 72 69 |that are|...retri|
|00000ac0| 65 76 65 64 20 62 79 20 | 63 61 6c 6c 69 6e 67 20 |eved by |calling |
|00000ad0| 47 65 74 4e 65 78 74 45 | 76 65 6e 74 20 6f 72 20 |GetNextE|vent or |
|00000ae0| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 2e 20 20 |WaitNext|Event. |
|00000af0| 57 69 74 68 6f 75 74 20 | 61 6e 79 0d 09 09 6d 6f |Without |any...mo|
|00000b00| 64 69 66 69 63 61 74 69 | 6f 6e 2c 20 74 68 69 73 |dificati|on, this|
|00000b10| 20 67 6c 6f 62 61 6c 20 | 69 73 20 6e 6f 72 6d 61 | global |is norma|
|00000b20| 6c 6c 79 20 4e 55 4c 4c | 2e 20 20 57 65 20 63 61 |lly NULL|. We ca|
|00000b30| 6e 2c 20 68 6f 77 65 76 | 65 72 2c 20 66 69 6c 6c |n, howev|er, fill|
|00000b40| 20 69 74 0d 09 09 77 69 | 74 68 20 74 68 65 20 61 | it...wi|th the a|
|00000b50| 64 64 72 65 73 73 20 6f | 66 20 61 20 22 66 69 6c |ddress o|f a "fil|
|00000b60| 74 65 72 20 70 72 6f 63 | 65 64 75 72 65 22 20 74 |ter proc|edure" t|
|00000b70| 68 61 74 20 65 78 61 6d | 69 6e 65 73 20 61 6e 20 |hat exam|ines an |
|00000b80| 65 76 65 6e 74 20 61 6e | 64 0d 09 09 64 65 63 69 |event an|d...deci|
|00000b90| 64 65 73 20 77 68 65 74 | 68 65 72 20 6f 72 20 6e |des whet|her or n|
|00000ba0| 6f 74 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |ot the a|pplicati|
|00000bb0| 6f 6e 20 67 61 74 68 65 | 72 69 6e 67 20 69 74 20 |on gathe|ring it |
|00000bc0| 73 68 6f 75 6c 64 20 61 | 63 74 75 61 6c 6c 79 20 |should a|ctually |
|00000bd0| 72 65 63 65 69 76 65 0d | 09 09 69 74 20 6f 72 20 |receive.|..it or |
|00000be0| 6e 6f 74 20 28 61 6e 64 | 20 70 6f 73 73 69 62 6c |not (and| possibl|
|00000bf0| 79 20 64 6f 69 6e 67 20 | 73 6f 6d 65 20 6f 74 68 |y doing |some oth|
|00000c00| 65 72 20 74 68 69 6e 67 | 73 20 61 6c 6f 6e 67 20 |er thing|s along |
|00000c10| 74 68 65 20 77 61 79 29 | 2e 20 20 49 20 61 6c 73 |the way)|. I als|
|00000c20| 6f 0d 09 09 72 65 66 65 | 72 20 74 6f 20 74 68 69 |o...refe|r to thi|
|00000c30| 73 20 66 69 6c 74 65 72 | 20 70 72 6f 63 65 64 75 |s filter| procedu|
|00000c40| 72 65 20 61 73 20 74 68 | 65 20 22 74 61 73 6b 20 |re as th|e "task |
|00000c50| 63 6f 64 65 2e 22 0d 09 | 09 0d 09 4d 45 4d 4f 52 |code."..|...MEMOR|
|00000c60| 59 20 53 48 41 52 49 4e | 47 0d 09 0d 09 09 54 68 |Y SHARIN|G.....Th|
|00000c70| 65 20 4a 47 4e 45 20 69 | 6e 73 74 61 6c 6c 65 72 |e JGNE i|nstaller|
|00000c80| 20 63 6f 64 65 20 28 74 | 68 65 20 6d 61 69 6e 20 | code (t|he main |
|00000c90| 72 6f 75 74 69 6e 65 29 | 20 73 68 61 72 65 73 20 |routine)| shares |
|00000ca0| 6d 65 6d 6f 72 79 20 77 | 69 74 68 20 74 68 65 20 |memory w|ith the |
|00000cb0| 63 6f 6e 74 72 6f 6c 0d | 09 09 70 61 6e 65 6c 20 |control.|..panel |
|00000cc0| 63 6f 64 65 20 62 79 20 | 73 74 6f 72 69 6e 67 20 |code by |storing |
|00000cd0| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 61 |the addr|ess of a|
|00000ce0| 20 67 6c 6f 62 61 6c 20 | 73 74 72 75 63 74 75 72 | global |structur|
|00000cf0| 65 20 28 6d 79 44 61 74 | 61 29 20 69 6e 20 61 0d |e (myDat|a) in a.|
|00000d00| 09 09 72 65 73 6f 75 72 | 63 65 2e 20 20 54 68 65 |..resour|ce. The|
|00000d10| 20 63 64 65 76 20 61 63 | 63 65 73 73 65 73 20 74 | cdev ac|cesses t|
|00000d20| 68 65 20 72 65 73 6f 75 | 72 63 65 20 61 6e 64 20 |he resou|rce and |
|00000d30| 63 68 65 63 6b 73 20 61 | 20 63 6f 6e 73 74 61 6e |checks a| constan|
|00000d40| 74 20 66 69 65 6c 64 20 | 74 6f 0d 09 09 65 6e 73 |t field |to...ens|
|00000d50| 75 72 65 20 74 68 61 74 | 20 69 74 20 68 61 73 20 |ure that| it has |
|00000d60| 74 68 65 20 73 68 61 72 | 65 64 20 64 61 74 61 2e |the shar|ed data.|
|00000d70| 0d 09 09 0d 09 09 54 68 | 65 20 69 6e 73 74 61 6c |......Th|e instal|
|00000d80| 6c 65 72 20 63 6f 64 65 | 20 28 61 6e 64 20 63 6f |ler code| (and co|
|00000d90| 6e 73 65 71 75 65 6e 74 | 6c 79 20 69 74 73 20 67 |nsequent|ly its g|
|00000da0| 6c 6f 62 61 6c 73 29 20 | 68 61 6e 67 73 20 61 72 |lobals) |hangs ar|
|00000db0| 6f 75 6e 64 20 65 76 65 | 6e 20 61 66 74 65 72 20 |ound eve|n after |
|00000dc0| 69 74 0d 09 09 72 75 6e | 73 20 62 79 20 72 65 74 |it...run|s by ret|
|00000dd0| 72 69 65 76 69 6e 67 20 | 61 20 68 61 6e 64 6c 65 |rieving |a handle|
|00000de0| 20 74 6f 20 69 74 73 65 | 6c 66 2c 20 6c 6f 63 6b | to itse|lf, lock|
|00000df0| 69 6e 67 20 69 74 73 65 | 6c 66 20 64 6f 77 6e 2c |ing itse|lf down,|
|00000e00| 20 61 6e 64 20 74 65 6c | 6c 69 6e 67 20 74 68 65 | and tel|ling the|
|00000e10| 0d 09 09 72 65 73 6f 75 | 72 63 65 20 6d 61 6e 61 |...resou|rce mana|
|00000e20| 67 65 72 20 74 6f 20 66 | 6f 72 67 65 74 20 69 74 |ger to f|orget it|
|00000e30| 2e 20 20 53 69 6e 63 65 | 20 77 65 20 61 6c 73 6f |. Since| we also|
|00000e40| 20 69 6e 63 6c 75 64 65 | 20 74 68 65 20 4a 47 4e | include| the JGN|
|00000e50| 45 20 66 69 6c 74 65 72 | 20 74 61 73 6b 0d 09 09 |E filter| task...|
|00000e60| 63 6f 64 65 20 69 6e 20 | 74 68 69 73 20 66 69 6c |code in |this fil|
|00000e70| 65 2c 20 74 68 65 20 69 | 6e 73 74 61 6c 6c 65 72 |e, the i|nstaller|
|00000e80| 20 63 6f 64 65 20 61 6e | 64 20 74 68 65 20 74 61 | code an|d the ta|
|00000e90| 73 6b 20 63 6f 64 65 20 | 61 72 65 20 61 6c 6c 20 |sk code |are all |
|00000ea0| 73 61 76 65 64 20 69 6e | 0d 09 09 74 68 65 20 73 |saved in|...the s|
|00000eb0| 61 6d 65 20 63 68 75 6e | 6b 20 6f 66 20 6d 65 6d |ame chun|k of mem|
|00000ec0| 6f 72 79 20 61 6c 6f 6e | 67 20 77 69 74 68 20 74 |ory alon|g with t|
|00000ed0| 68 65 20 67 6c 6f 62 61 | 6c 73 2e 20 20 54 68 61 |he globa|ls. Tha|
|00000ee0| 74 27 73 20 77 68 79 20 | 74 68 65 20 74 61 73 6b |t's why |the task|
|00000ef0| 20 63 6f 64 65 0d 09 09 | 63 61 6e 20 61 63 63 65 | code...|can acce|
|00000f00| 73 73 20 74 68 65 20 73 | 61 6d 65 20 67 6c 6f 62 |ss the s|ame glob|
|00000f10| 61 6c 73 20 61 73 20 74 | 68 65 20 69 6e 73 74 61 |als as t|he insta|
|00000f20| 6c 6c 65 72 20 63 6f 64 | 65 2e 0d 09 0d 09 53 45 |ller cod|e.....SE|
|00000f30| 54 55 50 41 34 0d 09 0d | 09 09 54 68 65 20 54 48 |TUPA4...|..The TH|
|00000f40| 49 4e 4b 20 43 20 63 6f | 6d 70 69 6c 65 72 20 68 |INK C co|mpiler h|
|00000f50| 61 73 20 61 20 6e 69 63 | 65 20 6d 65 63 68 61 6e |as a nic|e mechan|
|00000f60| 69 73 6d 20 74 68 61 74 | 20 61 6c 6c 6f 77 73 20 |ism that| allows |
|00000f70| 67 6c 6f 62 61 6c 20 76 | 61 72 69 61 62 6c 65 73 |global v|ariables|
|00000f80| 20 69 6e 0d 09 09 63 6f | 64 65 20 72 65 73 6f 75 | in...co|de resou|
|00000f90| 72 63 65 73 2e 20 20 4e | 6f 72 6d 61 6c 6c 79 2c |rces. N|ormally,|
|00000fa0| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00000fb0| 73 20 69 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |s in app|lication|
|00000fc0| 73 20 61 72 65 20 61 63 | 63 65 73 73 65 64 0d 09 |s are ac|cessed..|
|00000fd0| 09 74 68 72 6f 75 67 68 | 20 74 68 65 20 41 35 20 |.through| the A5 |
|00000fe0| 72 65 67 69 73 74 65 72 | 2e 20 20 53 69 6e 63 65 |register|. Since|
|00000ff0| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 73 20 | code re|sources |
|00001000| 72 75 6e 20 77 68 69 6c | 65 20 61 6e 20 61 70 70 |run whil|e an app|
|00001010| 6c 69 63 61 74 69 6f 6e | 0d 09 09 69 73 20 75 73 |lication|...is us|
|00001020| 69 6e 67 20 74 68 65 20 | 41 35 20 72 65 67 69 73 |ing the |A5 regis|
|00001030| 74 65 72 2c 20 54 48 49 | 4e 4b 20 6c 65 74 73 20 |ter, THI|NK lets |
|00001040| 74 68 65 20 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |the code| resourc|
|00001050| 65 20 75 73 65 20 74 68 | 65 20 41 34 20 72 65 67 |e use th|e A4 reg|
|00001060| 69 73 74 65 72 0d 09 09 | 74 6f 20 61 63 63 65 73 |ister...|to acces|
|00001070| 73 20 69 74 73 20 67 6c | 6f 62 61 6c 73 2e 20 20 |s its gl|obals. |
|00001080| 54 68 65 20 6d 65 63 68 | 61 6e 69 73 6d 20 61 6c |The mech|anism al|
|00001090| 6c 6f 77 73 20 61 63 63 | 65 73 73 20 74 6f 20 74 |lows acc|ess to t|
|000010a0| 68 65 20 73 61 6d 65 20 | 67 6c 6f 62 61 6c 73 0d |he same |globals.|
|000010b0| 09 09 62 79 20 61 6e 79 | 20 72 6f 75 74 69 6e 65 |..by any| routine|
|000010c0| 20 69 6e 20 74 68 65 20 | 73 61 6d 65 20 66 69 6c | in the |same fil|
|000010d0| 65 20 28 63 6f 6d 70 69 | 6c 65 64 20 69 6e 74 6f |e (compi|led into|
|000010e0| 20 74 68 65 20 73 61 6d | 65 20 72 65 73 6f 75 72 | the sam|e resour|
|000010f0| 63 65 29 2e 20 20 53 65 | 65 0d 09 09 54 48 49 4e |ce). Se|e...THIN|
|00001100| 4b 27 73 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |K's docu|mentatio|
|00001110| 6e 20 66 6f 72 20 66 75 | 72 74 68 65 72 20 65 78 |n for fu|rther ex|
|00001120| 70 6c 61 6e 61 74 69 6f | 6e 2e 0d 09 09 0d 09 57 |planatio|n......W|
|00001130| 48 59 20 49 53 20 54 48 | 45 20 43 4f 4e 54 52 4f |HY IS TH|E CONTRO|
|00001140| 4c 20 50 41 4e 45 4c 20 | 49 4e 20 41 20 44 49 46 |L PANEL |IN A DIF|
|00001150| 46 45 52 45 4e 54 20 50 | 52 4f 4a 45 43 54 3f 0d |FERENT P|ROJECT?.|
|00001160| 09 0d 09 09 54 68 65 20 | 73 79 73 74 65 6d 20 72 |....The |system r|
|00001170| 65 71 75 69 72 65 73 20 | 74 68 61 74 20 61 20 63 |equires |that a c|
|00001180| 6f 6e 74 72 6f 6c 20 70 | 61 6e 65 6c 20 72 65 73 |ontrol p|anel res|
|00001190| 69 64 65 20 69 6e 20 69 | 74 73 20 6f 77 6e 20 72 |ide in i|ts own r|
|000011a0| 65 73 6f 75 72 63 65 20 | 77 69 74 68 0d 09 09 61 |esource |with...a|
|000011b0| 20 63 65 72 74 61 69 6e | 20 72 65 73 6f 75 72 63 | certain| resourc|
|000011c0| 65 20 74 79 70 65 20 61 | 6e 64 20 61 20 63 65 72 |e type a|nd a cer|
|000011d0| 74 61 69 6e 20 72 65 73 | 6f 75 72 63 65 20 6e 75 |tain res|ource nu|
|000011e0| 6d 62 65 72 2e 20 20 54 | 68 69 73 20 63 6f 64 65 |mber. T|his code|
|000011f0| 20 69 73 20 73 61 76 65 | 64 0d 09 09 69 6e 20 61 | is save|d...in a|
|00001200| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 20 6f | code re|source o|
|00001210| 66 20 74 79 70 65 20 27 | 49 4e 49 54 27 20 77 69 |f type '|INIT' wi|
|00001220| 74 68 20 72 65 73 6f 75 | 72 63 65 20 69 64 20 30 |th resou|rce id 0|
|00001230| 2e 20 20 43 6f 64 65 20 | 72 65 73 6f 75 72 63 65 |. Code |resource|
|00001240| 73 20 6f 66 0d 09 09 74 | 79 70 65 20 27 49 4e 49 |s of...t|ype 'INI|
|00001250| 54 27 20 69 6e 20 61 20 | 66 69 6c 65 20 6f 66 20 |T' in a |file of |
|00001260| 74 79 70 65 20 27 49 4e | 49 54 27 20 74 68 61 74 |type 'IN|IT' that|
|00001270| 20 61 72 65 20 69 6e 20 | 74 68 65 20 53 79 73 74 | are in |the Syst|
|00001280| 65 6d 20 46 6f 6c 64 65 | 72 2c 0d 09 09 45 78 74 |em Folde|r,...Ext|
|00001290| 65 6e 73 69 6f 6e 73 20 | 46 6f 6c 64 65 72 2c 20 |ensions |Folder, |
|000012a0| 6f 72 20 43 6f 6e 74 72 | 6f 6c 20 50 61 6e 65 6c |or Contr|ol Panel|
|000012b0| 73 20 46 6f 6c 64 65 72 | 20 61 72 65 20 61 75 74 |s Folder| are aut|
|000012c0| 6f 6d 61 74 69 63 61 6c | 6c 79 20 65 78 65 63 75 |omatical|ly execu|
|000012d0| 74 65 64 20 61 74 0d 09 | 09 73 74 61 72 74 75 70 |ted at..|.startup|
|000012e0| 20 74 69 6d 65 2e 20 20 | 54 68 69 73 20 49 4e 49 | time. |This INI|
|000012f0| 54 20 66 69 6c 65 20 69 | 73 20 61 6c 73 6f 20 61 |T file i|s also a|
|00001300| 6c 6c 6f 77 65 64 20 74 | 6f 20 68 61 76 65 20 61 |llowed t|o have a|
|00001310| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 20 6f | code re|source o|
|00001320| 66 0d 09 09 74 79 70 65 | 20 27 63 64 65 76 27 20 |f...type| 'cdev' |
|00001330| 69 6e 20 69 74 20 61 6c | 6c 6f 77 69 6e 67 20 75 |in it al|lowing u|
|00001340| 73 20 74 6f 20 63 6f 6d | 62 69 6e 65 20 61 20 63 |s to com|bine a c|
|00001350| 6f 6e 74 72 6f 6c 20 70 | 61 6e 65 6c 20 28 63 64 |ontrol p|anel (cd|
|00001360| 65 76 29 20 61 6e 64 0d | 09 09 65 78 74 65 6e 73 |ev) and.|..extens|
|00001370| 69 6f 6e 20 28 49 4e 49 | 54 29 20 69 6e 74 6f 20 |ion (INI|T) into |
|00001380| 74 68 65 20 73 61 6d 65 | 20 66 69 6e 69 73 68 65 |the same| finishe|
|00001390| 64 20 66 69 6c 65 2e 20 | 20 54 68 65 79 20 6f 6e |d file. | They on|
|000013a0| 6c 79 20 68 61 76 65 20 | 74 6f 20 62 65 20 63 6f |ly have |to be co|
|000013b0| 6d 70 69 6c 65 64 0d 09 | 09 73 65 70 61 72 61 74 |mpiled..|.separat|
|000013c0| 65 6c 79 20 61 6e 64 20 | 70 75 74 20 69 6e 74 6f |ely and |put into|
|000013d0| 20 64 69 66 66 65 72 65 | 6e 74 20 63 6f 64 65 20 | differe|nt code |
|000013e0| 72 65 73 6f 75 72 63 65 | 73 2e 0d 09 0d 09 57 48 |resource|s.....WH|
|000013f0| 41 54 20 49 46 20 54 57 | 4f 20 45 58 54 45 4e 53 |AT IF TW|O EXTENS|
|00001400| 49 4f 4e 53 20 42 4f 54 | 48 20 57 41 4e 54 20 54 |IONS BOT|H WANT T|
|00001410| 4f 20 49 4e 53 54 41 4c | 4c 20 4a 47 4e 45 20 46 |O INSTAL|L JGNE F|
|00001420| 49 4c 54 45 52 53 3f 0d | 09 0d 09 09 41 6e 79 20 |ILTERS?.|....Any |
|00001430| 64 65 63 65 6e 74 20 4a | 47 4e 45 20 66 69 6c 74 |decent J|GNE filt|
|00001440| 65 72 20 73 61 76 65 73 | 20 74 68 65 20 61 64 64 |er saves| the add|
|00001450| 72 65 73 73 20 6f 66 20 | 61 6e 79 20 66 69 6c 74 |ress of |any filt|
|00001460| 65 72 20 61 6c 72 65 61 | 64 79 20 69 6e 73 74 61 |er alrea|dy insta|
|00001470| 6c 6c 65 64 0d 09 09 61 | 6e 64 20 6a 75 6d 70 73 |lled...a|nd jumps|
|00001480| 20 74 6f 20 74 68 61 74 | 20 66 69 6c 74 65 72 20 | to that| filter |
|00001490| 61 66 74 65 72 20 69 74 | 20 72 75 6e 73 20 69 74 |after it| runs it|
|000014a0| 73 65 6c 66 2e 20 20 4c | 69 6b 65 20 73 6f 2e 2e |self. L|ike so..|
|000014b0| 2e 0d 09 09 0d 09 09 09 | 4a 47 4e 45 46 69 6c 74 |........|JGNEFilt|
|000014c0| 65 72 20 2d 2d 3e 20 61 | 46 69 6c 74 65 72 09 09 |er --> a|Filter..|
|000014d0| 28 67 6c 6f 62 61 6c 20 | 61 6c 72 65 61 64 79 20 |(global |already |
|000014e0| 70 6f 69 6e 74 73 20 74 | 6f 20 61 20 66 69 6c 74 |points t|o a filt|
|000014f0| 65 72 29 0d 09 09 09 6f | 6c 64 46 69 6c 74 65 72 |er)....o|ldFilter|
|00001500| 3d 4a 47 4e 45 46 69 6c | 74 65 72 09 09 28 77 65 |=JGNEFil|ter..(we|
|00001510| 20 73 61 76 65 20 74 68 | 65 20 76 61 6c 75 65 20 | save th|e value |
|00001520| 69 6e 20 61 20 67 6c 6f | 62 61 6c 20 6f 66 20 6f |in a glo|bal of o|
|00001530| 75 72 20 6f 77 6e 29 0d | 09 09 09 4a 47 4e 45 46 |ur own).|...JGNEF|
|00001540| 69 6c 74 65 72 3d 6d 79 | 46 69 6c 74 65 72 09 09 |ilter=my|Filter..|
|00001550| 09 28 61 6e 64 20 69 6e | 73 74 61 6c 6c 20 6f 75 |.(and in|stall ou|
|00001560| 72 20 6f 77 6e 20 66 69 | 6c 74 65 72 29 0d 09 09 |r own fi|lter)...|
|00001570| 09 0d 09 09 09 6d 79 46 | 69 6c 74 65 72 2d 2d 3e |.....myF|ilter-->|
|00001580| 6f 6c 64 46 69 6c 74 65 | 72 09 09 28 61 66 74 65 |oldFilte|r..(afte|
|00001590| 72 20 6d 79 46 69 6c 74 | 65 72 20 72 75 6e 73 2c |r myFilt|er runs,|
|000015a0| 20 69 74 20 6a 75 6d 70 | 73 20 74 6f 20 74 68 65 | it jump|s to the|
|000015b0| 29 0d 09 09 09 09 09 09 | 09 09 09 09 28 61 64 64 |).......|....(add|
|000015c0| 72 65 73 73 20 73 74 6f | 72 65 64 20 69 6e 20 6f |ress sto|red in o|
|000015d0| 6c 64 46 69 6c 74 65 72 | 29 0d 09 09 0d 09 09 41 |ldFilter|)......A|
|000015e0| 20 6c 6f 6e 67 20 63 68 | 61 69 6e 20 6f 66 20 4a | long ch|ain of J|
|000015f0| 47 4e 45 20 66 69 6c 74 | 65 72 73 20 6d 69 67 68 |GNE filt|ers migh|
|00001600| 74 20 65 78 69 73 74 2c | 20 65 61 63 68 20 63 61 |t exist,| each ca|
|00001610| 6c 6c 69 6e 67 20 74 68 | 65 20 6e 65 78 74 20 66 |lling th|e next f|
|00001620| 69 6c 74 65 72 0d 09 09 | 69 6e 20 6c 69 6e 65 20 |ilter...|in line |
|00001630| 75 6e 74 69 6c 20 65 78 | 65 63 75 74 69 6f 6e 20 |until ex|ecution |
|00001640| 69 73 20 72 65 74 75 72 | 6e 65 64 20 74 6f 20 74 |is retur|ned to t|
|00001650| 68 65 20 70 72 6f 67 72 | 61 6d 20 74 68 61 74 20 |he progr|am that |
|00001660| 63 61 6c 6c 65 64 20 47 | 65 74 4e 65 78 74 45 76 |called G|etNextEv|
|00001670| 65 6e 74 0d 09 09 6f 72 | 20 57 61 69 74 4e 65 78 |ent...or| WaitNex|
|00001680| 74 45 76 65 6e 74 20 69 | 6e 20 74 68 65 20 66 69 |tEvent i|n the fi|
|00001690| 72 73 74 20 70 6c 61 63 | 65 2e 0d 09 0d 09 54 48 |rst plac|e.....TH|
|000016a0| 45 20 27 73 79 73 7a 27 | 20 52 45 53 4f 55 52 43 |E 'sysz'| RESOURC|
|000016b0| 45 0d 09 0d 09 09 54 68 | 65 72 65 20 69 73 20 61 |E.....Th|ere is a|
|000016c0| 20 72 65 73 6f 75 72 63 | 65 20 69 6e 63 6c 75 64 | resourc|e includ|
|000016d0| 65 64 20 69 6e 20 74 68 | 65 20 70 72 6f 6a 65 63 |ed in th|e projec|
|000016e0| 74 20 6f 66 20 74 79 70 | 65 20 27 73 79 73 7a 2e |t of typ|e 'sysz.|
|000016f0| 27 20 20 54 68 69 73 20 | 72 65 73 6f 75 72 63 65 |' This |resource|
|00001700| 0d 09 09 68 6f 6c 64 73 | 20 6f 6e 65 20 6c 6f 6e |...holds| one lon|
|00001710| 67 20 76 61 6c 75 65 20 | 74 68 61 74 2c 20 4f 4e |g value |that, ON|
|00001720| 4c 59 20 69 6e 20 50 52 | 45 20 73 79 73 74 65 6d |LY in PR|E system|
|00001730| 20 37 20 6d 61 63 68 69 | 6e 65 73 2c 20 61 63 74 | 7 machi|nes, act|
|00001740| 73 20 61 73 20 61 20 72 | 65 71 75 65 73 74 0d 09 |s as a r|equest..|
|00001750| 09 74 6f 20 61 64 64 20 | 74 68 61 74 20 6e 75 6d |.to add |that num|
|00001760| 62 65 72 20 6f 66 20 62 | 79 74 65 73 20 74 6f 20 |ber of b|ytes to |
|00001770| 74 68 65 20 73 79 73 74 | 65 6d 20 68 65 61 70 2e |the syst|em heap.|
|00001780| 20 20 41 67 61 69 6e 2c | 20 74 68 69 73 20 6f 6e | Again,| this on|
|00001790| 6c 79 20 68 61 73 20 61 | 6e 79 0d 09 09 65 66 66 |ly has a|ny...eff|
|000017a0| 65 63 74 20 69 66 20 6c | 6f 61 64 65 64 20 6f 6e |ect if l|oaded on|
|000017b0| 20 61 20 73 79 73 74 65 | 6d 20 36 20 6f 72 20 65 | a syste|m 6 or e|
|000017c0| 61 72 6c 69 65 72 20 6d | 61 63 68 69 6e 65 2e 20 |arlier m|achine. |
|000017d0| 20 54 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 62 | The num|ber of b|
|000017e0| 79 74 65 73 0d 09 09 72 | 65 71 75 65 73 74 65 64 |ytes...r|equested|
|000017f0| 20 69 73 20 61 64 64 65 | 64 20 74 6f 20 74 68 65 | is adde|d to the|
|00001800| 20 73 79 73 74 65 6d 20 | 68 65 61 70 2c 20 62 75 | system |heap, bu|
|00001810| 74 20 61 72 65 20 4e 4f | 54 20 72 65 73 65 72 76 |t are NO|T reserv|
|00001820| 65 64 20 66 6f 72 20 61 | 6e 79 20 63 6f 64 65 0d |ed for a|ny code.|
|00001830| 09 09 6f 72 20 70 72 6f | 67 72 61 6d 20 69 6e 20 |..or pro|gram in |
|00001840| 70 61 72 74 69 63 75 6c | 61 72 2e 0d 09 09 0d 09 |particul|ar......|
|00001850| 4e 4f 54 45 0d 09 0d 09 | 09 59 6f 75 20 73 68 6f |NOTE....|.You sho|
|00001860| 75 6c 64 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 |uld not |need to |
|00001870| 6d 61 6b 65 20 61 6e 79 | 20 63 68 61 6e 67 65 73 |make any| changes|
|00001880| 20 74 6f 20 61 6e 79 74 | 68 69 6e 67 20 69 6e 20 | to anyt|hing in |
|00001890| 74 68 69 73 20 66 69 6c | 65 2e 0d 09 09 41 6e 79 |this fil|e....Any|
|000018a0| 20 61 6c 6c 6f 63 61 74 | 69 6f 6e 20 6f 66 20 6d | allocat|ion of m|
|000018b0| 65 6d 6f 72 79 20 6f 72 | 20 6c 6f 61 64 69 6e 67 |emory or| loading|
|000018c0| 20 6f 66 20 72 65 73 6f | 75 72 63 65 73 20 73 68 | of reso|urces sh|
|000018d0| 6f 75 6c 64 20 62 65 20 | 64 6f 6e 65 20 69 6e 0d |ould be |done in.|
|000018e0| 09 09 4d 79 49 6e 69 74 | 69 61 6c 69 7a 65 2e 63 |..MyInit|ialize.c|
|000018f0| 2e 20 20 54 68 65 20 6f | 6e 6c 79 20 6f 74 68 65 |. The o|nly othe|
|00001900| 72 20 72 6f 75 74 69 6e | 65 20 79 6f 75 20 73 68 |r routin|e you sh|
|00001910| 6f 75 6c 64 20 6e 65 65 | 64 20 74 6f 20 6d 6f 64 |ould nee|d to mod|
|00001920| 69 66 79 20 69 73 0d 09 | 09 74 68 65 20 4d 79 45 |ify is..|.the MyE|
|00001930| 76 74 48 61 6e 64 6c 65 | 72 20 72 6f 75 74 69 6e |vtHandle|r routin|
|00001940| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 4d 79 |e in the| file My|
|00001950| 45 76 74 48 61 6e 64 6c | 65 72 2e 63 2e 0d 2a 2f |EvtHandl|er.c..*/|
|00001960| 0d 0d 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |../*****|********|
|00001970| 2a 2a 2a 2a 2a 2a 2a 2a | 20 49 4e 43 4c 55 44 45 |********| INCLUDE|
|00001980| 44 20 48 45 41 44 45 52 | 53 20 2a 2a 2a 2a 2a 2a |D HEADER|S ******|
|00001990| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000019a0| 2a 2f 0d 0d 23 69 6e 63 | 6c 75 64 65 20 3c 53 65 |*/..#inc|lude <Se|
|000019b0| 74 55 70 41 34 2e 68 3e | 09 2f 2a 20 54 68 69 73 |tUpA4.h>|./* This|
|000019c0| 20 68 65 61 64 65 72 20 | 66 69 6c 65 20 63 6f 6e | header |file con|
|000019d0| 74 61 69 6e 73 20 63 6f | 64 65 21 21 20 20 53 69 |tains co|de!! Si|
|000019e0| 6e 63 65 09 09 09 2a 2f | 0d 09 09 09 09 09 09 2f |nce...*/|......./|
|000019f0| 2a 20 49 27 6d 20 75 73 | 69 6e 67 20 74 68 65 20 |* I'm us|ing the |
|00001a00| 73 74 61 6e 64 61 72 64 | 20 54 48 49 4e 4b 20 43 |standard| THINK C|
|00001a10| 20 68 65 61 64 65 72 20 | 77 68 69 63 68 09 09 2a | header |which..*|
|00001a20| 2f 0d 09 09 09 09 09 09 | 2f 2a 20 61 75 74 6f 6d |/.......|/* autom|
|00001a30| 61 74 69 63 61 6c 6c 79 | 20 6a 75 6d 70 73 20 74 |atically| jumps t|
|00001a40| 6f 20 6d 61 69 6e 2c 20 | 49 27 6d 20 61 6c 6c 20 |o main, |I'm all |
|00001a50| 72 69 67 68 74 09 09 2a | 2f 0d 09 09 09 09 09 09 |right..*|/.......|
|00001a60| 2f 2a 20 69 6e 63 6c 75 | 64 69 6e 67 20 74 68 69 |/* inclu|ding thi|
|00001a70| 73 20 68 65 72 65 2e 20 | 20 55 73 69 6e 67 20 74 |s here. | Using t|
|00001a80| 68 65 20 73 74 61 6e 64 | 61 72 64 20 68 65 61 64 |he stand|ard head|
|00001a90| 65 72 09 2a 2f 0d 09 09 | 09 09 09 09 2f 2a 20 69 |er.*/...|..../* i|
|00001aa0| 73 20 61 6e 20 6f 70 74 | 69 6f 6e 20 69 6e 20 74 |s an opt|ion in t|
|00001ab0| 68 65 20 70 72 6f 6a 65 | 63 74 20 74 79 70 65 20 |he proje|ct type |
|00001ac0| 64 69 61 6c 6f 67 2e 09 | 09 09 2a 2f 0d 09 09 09 |dialog..|..*/....|
|00001ad0| 09 09 09 2f 2a 20 54 68 | 65 20 73 74 61 6e 64 61 |.../* Th|e standa|
|00001ae0| 72 64 20 68 65 61 64 65 | 72 20 69 73 20 75 73 65 |rd heade|r is use|
|00001af0| 64 20 77 68 65 6e 20 74 | 68 65 20 43 75 73 74 6f |d when t|he Custo|
|00001b00| 6d 09 09 2a 2f 0d 09 09 | 09 09 09 09 2f 2a 20 68 |m..*/...|..../* h|
|00001b10| 65 61 64 65 72 20 63 68 | 65 63 6b 20 62 6f 78 20 |eader ch|eck box |
|00001b20| 69 73 20 4e 4f 54 20 63 | 68 65 63 6b 65 64 2e 09 |is NOT c|hecked..|
|00001b30| 09 09 09 09 2a 2f 0d 0d | 23 69 6e 63 6c 75 64 65 |....*/..|#include|
|00001b40| 20 22 53 68 61 72 65 64 | 44 61 74 61 2e 68 22 09 | "Shared|Data.h".|
|00001b50| 2f 2a 20 69 6e 63 6c 75 | 64 65 73 20 64 65 66 69 |/* inclu|des defi|
|00001b60| 6e 69 74 69 6f 6e 73 20 | 6f 66 20 64 61 74 61 20 |nitions |of data |
|00001b70| 73 74 72 75 63 74 75 72 | 65 73 09 09 09 2a 2f 0d |structur|es...*/.|
|00001b80| 09 09 09 09 09 09 2f 2a | 20 75 73 65 64 20 62 6f |....../*| used bo|
|00001b90| 74 68 20 68 65 72 65 20 | 61 6e 64 20 69 6e 20 74 |th here |and in t|
|00001ba0| 68 65 20 63 64 65 76 2c | 20 61 6e 64 20 73 6f 6d |he cdev,| and som|
|00001bb0| 65 09 09 09 2a 2f 0d 09 | 09 09 09 09 09 2f 2a 20 |e...*/..|...../* |
|00001bc0| 63 6f 6d 6d 6f 6e 20 64 | 65 66 69 6e 65 73 20 75 |common d|efines u|
|00001bd0| 73 65 64 20 62 79 20 62 | 6f 74 68 2e 09 09 09 09 |sed by b|oth.....|
|00001be0| 09 09 2a 2f 0d 0d 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |..*/../*|********|
|00001bf0| 2a 2a 20 50 52 4f 4a 45 | 43 54 20 53 50 45 43 49 |** PROJE|CT SPECI|
|00001c00| 46 49 43 20 44 45 46 49 | 4e 45 53 2c 20 47 4c 4f |FIC DEFI|NES, GLO|
|00001c10| 42 41 4c 53 2c 20 45 54 | 43 2e 20 2a 2a 2a 2a 2a |BALS, ET|C. *****|
|00001c20| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 0d 23 69 6e 63 6c |********|/..#incl|
|00001c30| 75 64 65 20 22 4d 79 44 | 65 66 69 6e 65 73 26 47 |ude "MyD|efines&G|
|00001c40| 6c 6f 62 61 6c 73 2e 68 | 22 0d 0d 2f 2a 2a 2a 2a |lobals.h|"../****|
|00001c50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001c60| 2a 2a 2a 2a 2a 2a 20 44 | 45 46 49 4e 45 53 20 2a |****** D|EFINES *|
|00001c70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 0d |********|*****/..|
|00001c90| 2f 2a 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |/* The f|ollowing|
|00001ca0| 20 74 68 72 65 65 20 69 | 63 6f 6e 73 20 61 72 65 | three i|cons are|
|00001cb0| 20 74 68 65 20 6f 6e 65 | 73 20 49 20 64 65 66 69 | the one|s I defi|
|00001cc0| 6e 65 64 20 66 6f 72 20 | 74 68 69 73 20 65 78 61 |ned for |this exa|
|00001cd0| 6d 70 6c 65 2e 20 20 4d | 6f 64 69 66 79 20 74 68 |mple. M|odify th|
|00001ce0| 65 6d 20 2a 2f 0d 2f 2a | 20 66 6f 72 20 79 6f 75 |em */./*| for you|
|00001cf0| 72 20 70 75 72 70 6f 73 | 65 73 20 6f 72 20 63 6f |r purpos|es or co|
|00001d00| 6d 65 20 75 70 20 77 69 | 74 68 20 73 6f 6d 65 20 |me up wi|th some |
|00001d10| 6f 6e 20 79 6f 75 72 20 | 6f 77 6e 2e 20 20 54 68 |on your |own. Th|
|00001d20| 65 20 6e 75 6d 62 65 72 | 73 20 2a 2f 0d 2f 2a 20 |e number|s */./* |
|00001d30| 61 72 65 20 72 65 73 6f | 75 72 63 65 20 6e 75 6d |are reso|urce num|
|00001d40| 62 65 72 73 2e 20 2a 2f | 0d 0d 23 64 65 66 69 6e |bers. */|..#defin|
|00001d50| 65 09 09 6b 49 63 6f 6e | 46 61 6d 69 6c 79 49 44 |e..kIcon|FamilyID|
|00001d60| 09 09 2d 34 30 36 34 09 | 2f 2a 20 49 43 4e 23 20 |..-4064.|/* ICN# |
|00001d70| 72 73 72 63 20 77 69 74 | 68 20 6f 75 72 20 69 63 |rsrc wit|h our ic|
|00001d80| 6f 6e 73 20 2a 2f 0d 23 | 64 65 66 69 6e 65 09 09 |ons */.#|define..|
|00001d90| 6b 58 49 63 6f 6e 49 44 | 09 09 09 2d 34 30 33 33 |kXIconID|...-4033|
|00001da0| 09 2f 2a 20 58 65 64 20 | 6f 75 74 20 69 63 6f 6e |./* Xed |out icon|
|00001db0| 20 66 61 6d 69 6c 79 20 | 2a 2f 0d 23 64 65 66 69 | family |*/.#defi|
|00001dc0| 6e 65 09 09 6b 4e 6f 41 | 63 74 69 6f 6e 49 63 6f |ne..kNoA|ctionIco|
|00001dd0| 6e 49 44 09 09 2d 34 30 | 33 34 09 2f 2a 20 69 63 |nID..-40|34./* ic|
|00001de0| 6f 6e 20 66 61 6d 69 6c | 79 20 77 68 65 6e 20 77 |on famil|y when w|
|00001df0| 65 27 72 65 20 4f 46 46 | 20 2a 2f 0d 0d 23 64 65 |e're OFF| */..#de|
|00001e00| 66 69 6e 65 09 09 6b 50 | 72 6f 63 65 73 73 4e 75 |fine..kP|rocessNu|
|00001e10| 6c 6c 45 76 74 73 09 66 | 61 6c 73 65 09 2f 2a 20 |llEvts.f|alse./* |
|00001e20| 65 78 61 6d 69 6e 65 2f | 70 72 6f 63 65 73 73 20 |examine/|process |
|00001e30| 6e 75 6c 6c 20 65 76 65 | 6e 74 73 3f 20 2a 2f 0d |null eve|nts? */.|
|00001e40| 0d 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00001e50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 20 4d 41 43 |********|**** MAC|
|00001e60| 52 4f 53 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ROS ****|********|
|00001e70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001e80| 2a 2a 2f 0d 0d 23 64 65 | 66 69 6e 65 09 09 47 6f |**/..#de|fine..Go|
|00001e90| 6f 64 45 76 74 28 78 29 | 09 28 78 20 26 20 30 78 |odEvt(x)|.(x & 0x|
|00001ea0| 46 46 30 30 29 09 2f 2a | 20 74 65 73 74 20 68 69 |FF00)./*| test hi|
|00001eb0| 67 68 20 62 79 74 65 20 | 6f 6e 6c 79 20 2a 2f 0d |gh byte |only */.|
|00001ec0| 0d 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00001ed0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 47 4c 4f 42 |********|*** GLOB|
|00001ee0| 41 4c 53 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ALS ****|********|
|00001ef0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001f00| 2f 0d 0d 50 74 72 09 09 | 4a 47 4e 45 66 69 6c 74 |/..Ptr..|JGNEfilt|
|00001f10| 65 72 20 3a 20 30 78 32 | 39 41 3b 09 2f 2a 20 6c |er : 0x2|9A;./* l|
|00001f20| 6f 77 20 6d 65 6d 6f 72 | 79 20 67 6c 6f 62 61 6c |ow memor|y global|
|00001f30| 20 74 68 61 74 20 70 6f | 69 6e 74 73 20 74 6f 20 | that po|ints to |
|00001f40| 74 68 65 20 2a 2f 0d 09 | 09 09 09 09 09 09 2f 2a |the */..|....../*|
|00001f50| 20 47 65 74 4e 65 78 74 | 45 76 65 6e 74 20 66 69 | GetNext|Event fi|
|00001f60| 6c 74 65 72 20 72 6f 75 | 74 69 6e 65 20 2a 2f 0d |lter rou|tine */.|
|00001f70| 0d 2f 2a 20 4d 65 6d 6f | 72 79 20 74 68 61 74 20 |./* Memo|ry that |
|00001f80| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 70 61 6e 65 |the cont|rol pane|
|00001f90| 6c 20 6e 65 65 64 73 20 | 74 6f 20 61 63 63 65 73 |l needs |to acces|
|00001fa0| 73 20 61 6c 73 6f 20 2a | 2f 0d 0d 6d 79 44 61 74 |s also *|/..myDat|
|00001fb0| 61 53 74 72 75 63 74 09 | 6d 79 44 61 74 61 3b 0d |aStruct.|myData;.|
|00001fc0| 0d 2f 2a 20 57 68 61 74 | 65 76 65 72 20 6f 74 68 |./* What|ever oth|
|00001fd0| 65 72 20 67 6c 6f 62 61 | 6c 73 20 77 65 20 6e 65 |er globa|ls we ne|
|00001fe0| 65 64 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 76 6f |ed */..p|ascal vo|
|00001ff0| 69 64 09 28 2a 74 68 65 | 4e 65 78 74 46 69 6c 74 |id.(*the|NextFilt|
|00002000| 65 72 29 28 20 76 6f 69 | 64 20 29 3b 09 2f 2a 20 |er)( voi|d );./* |
|00002010| 74 68 65 20 6e 65 78 74 | 20 4a 47 4e 45 20 66 69 |the next| JGNE fi|
|00002020| 6c 74 65 72 20 28 69 66 | 20 61 6e 79 29 20 2a 2f |lter (if| any) */|
|00002030| 0d 0d 42 6f 6f 6c 65 61 | 6e 09 09 09 69 6e 74 65 |..Boolea|n...inte|
|00002040| 72 63 65 70 74 49 74 3b | 09 2f 2a 20 61 72 65 20 |rceptIt;|./* are |
|00002050| 77 65 20 69 6e 74 65 72 | 63 65 70 74 69 6e 67 20 |we inter|cepting |
|00002060| 74 68 65 20 65 76 65 6e | 74 3f 20 2a 2f 0d 73 68 |the even|t? */.sh|
|00002070| 6f 72 74 2a 09 09 09 6d | 79 52 65 74 75 72 6e 56 |ort*...m|yReturnV|
|00002080| 61 6c 3b 09 2f 2a 20 61 | 64 64 72 20 6f 66 20 66 |al;./* a|ddr of f|
|00002090| 69 6c 74 65 72 27 73 20 | 72 65 74 75 72 6e 20 76 |ilter's |return v|
|000020a0| 61 6c 75 65 20 6f 6e 20 | 73 74 61 63 6b 20 2a 2f |alue on |stack */|
|000020b0| 0d 45 76 65 6e 74 52 65 | 63 6f 72 64 2a 09 6d 79 |.EventRe|cord*.my|
|000020c0| 45 76 74 50 74 72 3b 09 | 09 2f 2a 20 70 6f 69 6e |EvtPtr;.|./* poin|
|000020d0| 74 65 72 20 74 6f 20 74 | 68 65 20 65 76 65 6e 74 |ter to t|he event|
|000020e0| 20 72 65 63 6f 72 64 20 | 2a 2f 0d 73 68 6f 72 74 | record |*/.short|
|000020f0| 09 09 09 73 74 69 6c 6c | 48 61 73 45 76 74 3b 09 |...still|HasEvt;.|
|00002100| 2f 2a 20 64 6f 20 77 65 | 20 68 61 76 65 20 61 6e |/* do we| have an|
|00002110| 20 65 76 65 6e 74 20 74 | 6f 20 77 6f 72 6b 20 77 | event t|o work w|
|00002120| 69 74 68 3f 20 2a 2f 0d | 0d 2f 2a 2a 2a 2a 2a 2a |ith? */.|./******|
|00002130| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002140| 2a 2a 20 50 52 4f 54 4f | 54 59 50 45 53 20 2a 2a |** PROTO|TYPES **|
|00002150| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002160| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 0d 76 6f 69 64 09 |********|/..void.|
|00002170| 09 6d 61 69 6e 28 20 76 | 6f 69 64 20 29 3b 0d 0d |.main( v|oid );..|
|00002180| 42 6f 6f 6c 65 61 6e 09 | 09 4d 79 49 6e 69 74 69 |Boolean.|.MyIniti|
|00002190| 61 6c 69 7a 65 28 20 6d | 79 44 61 74 61 50 74 72 |alize( m|yDataPtr|
|000021a0| 20 6d 79 44 61 74 61 2c | 20 42 6f 6f 6c 65 61 6e | myData,| Boolean|
|000021b0| 20 2a 69 6e 73 74 61 6c | 6c 54 61 73 6b 2c 20 42 | *instal|lTask, B|
|000021c0| 6f 6f 6c 65 61 6e 20 2a | 73 68 6f 77 49 63 6f 6e |oolean *|showIcon|
|000021d0| 20 29 3b 0d 0d 76 6f 69 | 64 09 09 53 68 6f 77 49 | );..voi|d..ShowI|
|000021e0| 63 6f 6e 46 61 6d 69 6c | 79 28 20 73 68 6f 72 74 |conFamil|y( short|
|000021f0| 20 69 63 6f 6e 49 64 20 | 29 3b 0d 0d 70 61 73 63 | iconId |);..pasc|
|00002200| 61 6c 20 76 6f 69 64 09 | 09 4d 79 54 61 73 6b 28 |al void.|.MyTask(|
|00002210| 20 76 6f 69 64 20 29 3b | 0d 0d 42 6f 6f 6c 65 61 | void );|..Boolea|
|00002220| 6e 09 09 50 72 6f 63 65 | 73 73 45 76 74 28 20 45 |n..Proce|ssEvt( E|
|00002230| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 65 76 65 6e |ventReco|rd *even|
|00002240| 74 20 29 3b 0d 0d 23 69 | 6e 63 6c 75 64 65 20 22 |t );..#i|nclude "|
|00002250| 4d 79 45 76 74 48 61 6e | 64 6c 65 72 2e 68 22 09 |MyEvtHan|dler.h".|
|00002260| 2f 2a 20 70 72 6f 74 6f | 74 79 70 65 73 2f 64 65 |/* proto|types/de|
|00002270| 66 69 6e 65 73 20 66 6f | 72 20 72 6f 75 74 69 6e |fines fo|r routin|
|00002280| 65 73 20 69 6e 20 4d 79 | 45 76 74 48 61 6e 64 6c |es in My|EvtHandl|
|00002290| 65 72 2e 63 20 2a 2f 0d | 0d 2f 2a 2a 2a 2a 2a 2a |er.c */.|./******|
|000022a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000022b0| 2a 2a 20 46 55 4e 43 54 | 49 4f 4e 53 20 2a 2a 2a |** FUNCT|IONS ***|
|000022c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000022d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 0d 2f 2a 20 6d 61 |********|/../* ma|
|000022e0| 69 6e 20 2a 2f 0d 2f 2f | 20 54 68 69 73 20 72 6f |in */.//| This ro|
|000022f0| 75 74 69 6e 65 20 69 73 | 20 61 63 74 75 61 6c 6c |utine is| actuall|
|00002300| 79 20 74 68 65 20 65 78 | 74 65 6e 73 69 6f 6e 20 |y the ex|tension |
|00002310| 6f 72 20 49 4e 49 54 20 | 63 6f 64 65 20 74 68 61 |or INIT |code tha|
|00002320| 74 20 69 73 20 72 75 6e | 20 61 74 20 73 74 61 72 |t is run| at star|
|00002330| 74 75 70 20 74 69 6d 65 | 2e 0d 2f 2f 20 49 74 73 |tup time|..// Its|
|00002340| 20 6a 6f 62 20 69 73 20 | 74 6f 20 69 6e 69 74 69 | job is |to initi|
|00002350| 61 6c 69 7a 65 20 76 61 | 72 69 61 62 6c 65 73 2c |alize va|riables,|
|00002360| 20 61 6c 6c 6f 63 61 74 | 65 20 61 6e 79 20 6d 65 | allocat|e any me|
|00002370| 6d 6f 72 79 20 77 65 27 | 6c 6c 20 6e 65 65 64 20 |mory we'|ll need |
|00002380| 6c 61 74 65 72 20 28 69 | 6e 20 74 68 65 0d 2f 2f |later (i|n the.//|
|00002390| 20 66 69 6c 74 65 72 20 | 63 6f 64 65 29 2c 20 63 | filter |code), c|
|000023a0| 68 65 63 6b 20 74 68 65 | 20 70 72 65 66 65 72 65 |heck the| prefere|
|000023b0| 6e 63 65 73 20 72 65 73 | 6f 75 72 63 65 2c 20 61 |nces res|ource, a|
|000023c0| 6e 64 20 69 6e 73 74 61 | 6c 6c 20 74 68 65 20 66 |nd insta|ll the f|
|000023d0| 69 6c 74 65 72 20 63 6f | 64 65 2e 0d 0d 76 6f 69 |ilter co|de...voi|
|000023e0| 64 09 6d 61 69 6e 28 20 | 76 6f 69 64 20 29 0d 7b |d.main( |void ).{|
|000023f0| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 09 09 73 68 6f |..Boolea|n....sho|
|00002400| 77 53 74 61 72 74 75 70 | 49 63 6f 6e 3b 09 2f 2a |wStartup|Icon;./*|
|00002410| 20 73 68 6f 77 20 69 63 | 6f 6e 20 61 74 20 73 74 | show ic|on at st|
|00002420| 61 72 74 75 70 3f 20 2a | 2f 0d 09 42 6f 6f 6c 65 |artup? *|/..Boole|
|00002430| 61 6e 09 09 09 09 69 6e | 73 74 61 6c 6c 54 61 73 |an....in|stallTas|
|00002440| 6b 3b 09 09 2f 2a 20 69 | 6e 73 74 61 6c 6c 20 74 |k;../* i|nstall t|
|00002450| 68 65 20 74 61 73 6b 3f | 20 2a 2f 0d 09 0d 09 42 |he task?| */....B|
|00002460| 6f 6f 6c 65 61 6e 09 09 | 09 09 73 74 69 6c 6c 4f |oolean..|..stillO|
|00002470| 4b 3b 09 09 09 2f 2a 20 | 73 74 69 6c 6c 20 4f 4b |K;.../* |still OK|
|00002480| 20 74 6f 20 70 72 6f 63 | 65 65 64 3f 20 2a 2f 0d | to proc|eed? */.|
|00002490| 09 0d 09 48 61 6e 64 6c | 65 09 09 09 09 6d 65 3b |...Handl|e....me;|
|000024a0| 09 09 09 09 09 2f 2a 20 | 61 20 68 61 6e 64 6c 65 |...../* |a handle|
|000024b0| 20 74 6f 20 74 68 69 73 | 20 63 6f 64 65 20 2a 2f | to this| code */|
|000024c0| 0d 09 0d 09 2f 2a 20 53 | 65 74 20 75 70 20 66 6f |..../* S|et up fo|
|000024d0| 72 20 41 34 20 62 61 73 | 65 64 20 67 6c 6f 62 61 |r A4 bas|ed globa|
|000024e0| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 28 73 70 65 |l variab|les (spe|
|000024f0| 63 69 66 69 63 20 74 6f | 20 54 48 49 4e 4b 20 43 |cific to| THINK C|
|00002500| 29 20 2a 2f 0d 09 0d 09 | 09 52 65 6d 65 6d 62 65 |) */....|.Remembe|
|00002510| 72 41 30 28 29 3b 09 2f | 2a 20 41 30 20 63 6f 6e |rA0();./|* A0 con|
|00002520| 74 61 69 6e 73 20 74 68 | 65 20 62 61 73 65 20 61 |tains th|e base a|
|00002530| 64 64 72 65 73 73 20 6f | 66 20 74 68 69 73 20 63 |ddress o|f this c|
|00002540| 6f 64 65 20 2a 2f 0d 09 | 09 53 65 74 55 70 41 34 |ode */..|.SetUpA4|
|00002550| 28 29 3b 0d 0d 09 2f 2a | 20 49 6e 69 74 69 61 6c |();.../*| Initial|
|00002560| 69 7a 65 20 73 6f 6d 65 | 20 6c 6f 63 61 6c 20 76 |ize some| local v|
|00002570| 61 72 69 61 62 6c 65 73 | 20 2a 2f 0d 09 0d 09 09 |ariables| */.....|
|00002580| 73 74 69 6c 6c 4f 4b 20 | 3d 20 74 72 75 65 3b 0d |stillOK |= true;.|
|00002590| 09 09 73 68 6f 77 53 74 | 61 72 74 75 70 49 63 6f |..showSt|artupIco|
|000025a0| 6e 20 3d 20 74 72 75 65 | 3b 0d 09 09 69 6e 73 74 |n = true|;...inst|
|000025b0| 61 6c 6c 54 61 73 6b 20 | 3d 20 74 72 75 65 3b 0d |allTask |= true;.|
|000025c0| 09 0d 09 2f 2a 20 52 65 | 74 72 69 65 76 65 20 61 |.../* Re|trieve a|
|000025d0| 20 68 61 6e 64 6c 65 20 | 74 6f 20 74 68 69 73 20 | handle |to this |
|000025e0| 63 6f 64 65 20 61 6e 64 | 20 6c 6f 63 6b 20 69 74 |code and| lock it|
|000025f0| 20 64 6f 77 6e 20 2a 2f | 0d 09 09 0d 09 09 7b 0d | down */|......{.|
|00002600| 09 09 09 50 74 72 09 09 | 70 74 72 54 6f 4d 65 3b |...Ptr..|ptrToMe;|
|00002610| 0d 09 09 09 0d 09 09 09 | 2f 2a 20 4d 6f 76 65 20 |........|/* Move |
|00002620| 74 68 65 20 76 61 6c 75 | 65 20 69 6e 20 72 65 67 |the valu|e in reg|
|00002630| 69 73 74 65 72 20 41 30 | 20 74 6f 20 70 74 72 54 |ister A0| to ptrT|
|00002640| 6f 4d 65 2e 20 20 41 30 | 20 68 6f 6c 64 73 20 74 |oMe. A0| holds t|
|00002650| 68 65 20 2a 2f 0d 09 09 | 09 2f 2a 20 64 69 72 65 |he */...|./* dire|
|00002660| 63 74 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |ct addre|ss of th|
|00002670| 69 73 20 63 6f 64 65 20 | 28 63 6f 75 72 74 65 73 |is code |(courtes|
|00002680| 79 20 54 48 49 4e 4b 29 | 2e 20 2a 2f 0d 09 09 09 |y THINK)|. */....|
|00002690| 0d 09 09 09 09 61 73 6d | 0d 09 09 09 09 7b 0d 09 |.....asm|.....{..|
|000026a0| 09 09 09 09 4d 4f 56 45 | 2e 4c 09 41 30 2c 70 74 |....MOVE|.L.A0,pt|
|000026b0| 72 54 6f 4d 65 0d 09 09 | 09 09 7d 0d 09 09 09 0d |rToMe...|..}.....|
|000026c0| 09 09 09 2f 2a 20 4e 6f | 77 20 72 65 63 6f 76 65 |.../* No|w recove|
|000026d0| 72 20 74 68 65 20 48 61 | 6e 64 6c 65 20 74 6f 20 |r the Ha|ndle to |
|000026e0| 74 68 69 73 20 63 6f 64 | 65 20 75 73 69 6e 67 20 |this cod|e using |
|000026f0| 52 65 63 6f 76 65 72 48 | 61 6e 64 6c 65 20 2a 2f |RecoverH|andle */|
|00002700| 0d 09 09 09 0d 09 09 09 | 09 6d 65 20 3d 20 52 65 |........|.me = Re|
|00002710| 63 6f 76 65 72 48 61 6e | 64 6c 65 28 20 70 74 72 |coverHan|dle( ptr|
|00002720| 54 6f 4d 65 20 29 3b 0d | 09 09 09 0d 09 09 09 2f |ToMe );.|......./|
|00002730| 2a 20 4d 61 6b 65 20 74 | 68 65 20 52 65 73 6f 75 |* Make t|he Resou|
|00002740| 72 63 65 20 4d 61 6e 61 | 67 65 72 20 66 6f 72 67 |rce Mana|ger forg|
|00002750| 65 74 20 61 62 6f 75 74 | 20 75 73 20 61 6e 64 20 |et about| us and |
|00002760| 6c 6f 63 6b 20 74 68 69 | 73 20 2a 2f 0d 09 09 09 |lock thi|s */....|
|00002770| 2f 2a 20 63 6f 64 65 20 | 64 6f 77 6e 20 73 6f 20 |/* code |down so |
|00002780| 69 74 20 73 74 61 79 73 | 20 69 6e 20 6d 65 6d 6f |it stays| in memo|
|00002790| 72 79 20 65 76 65 6e 20 | 61 66 74 65 72 20 74 68 |ry even |after th|
|000027a0| 65 20 65 78 74 65 6e 73 | 69 6f 6e 20 2a 2f 0d 09 |e extens|ion */..|
|000027b0| 09 09 2f 2a 20 68 61 73 | 20 72 75 6e 20 69 74 73 |../* has| run its|
|000027c0| 20 63 6f 75 72 73 65 2e | 20 20 54 68 69 73 20 61 | course.| This a|
|000027d0| 6c 6c 6f 77 73 20 74 68 | 65 20 67 6c 6f 62 61 6c |llows th|e global|
|000027e0| 73 20 77 65 27 76 65 20 | 64 65 66 69 6e 65 64 20 |s we've |defined |
|000027f0| 2a 2f 0d 09 09 09 2f 2a | 20 74 6f 20 68 61 6e 67 |*/..../*| to hang|
|00002800| 20 61 72 6f 75 6e 64 20 | 28 61 73 20 77 65 6c 6c | around |(as well|
|00002810| 20 61 73 20 74 68 65 20 | 74 61 73 6b 20 63 6f 64 | as the |task cod|
|00002820| 65 29 2e 20 2a 2f 0d 09 | 09 09 0d 09 09 09 09 44 |e). */..|.......D|
|00002830| 65 74 61 63 68 52 65 73 | 6f 75 72 63 65 28 20 6d |etachRes|ource( m|
|00002840| 65 20 29 3b 0d 09 09 09 | 09 48 4c 6f 63 6b 28 20 |e );....|.HLock( |
|00002850| 6d 65 20 29 3b 0d 09 09 | 7d 0d 09 09 0d 09 2f 2a |me );...|}...../*|
|00002860| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 73 6f 6d 65 | Initial|ize some|
|00002870| 20 76 61 6c 75 65 73 20 | 2a 2f 0d 0d 09 09 69 66 | values |*/....if|
|00002880| 20 28 20 73 74 69 6c 6c | 4f 4b 20 29 0d 09 09 7b | ( still|OK )...{|
|00002890| 0d 09 09 09 2f 2a 20 54 | 68 69 73 20 63 68 65 63 |..../* T|his chec|
|000028a0| 6b 20 76 61 6c 75 65 20 | 69 73 20 63 68 65 63 6b |k value |is check|
|000028b0| 65 64 20 62 79 20 74 68 | 65 20 63 64 65 76 20 74 |ed by th|e cdev t|
|000028c0| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 65 20 |o make s|ure the |
|000028d0| 2a 2f 0d 09 09 09 2f 2a | 20 65 78 74 65 6e 73 69 |*/..../*| extensi|
|000028e0| 6f 6e 20 77 61 73 20 72 | 75 6e 20 61 74 20 73 79 |on was r|un at sy|
|000028f0| 73 74 65 6d 20 73 74 61 | 72 74 75 70 20 74 69 6d |stem sta|rtup tim|
|00002900| 65 2e 20 2a 2f 0d 09 09 | 09 0d 09 09 09 09 6d 79 |e. */...|......my|
|00002910| 44 61 74 61 2e 63 68 65 | 63 6b 56 61 6c 75 65 20 |Data.che|ckValue |
|00002920| 3d 20 30 78 31 32 33 34 | 31 32 33 34 3b 0d 09 09 |= 0x1234|1234;...|
|00002930| 09 0d 09 09 09 2f 2a 20 | 53 65 74 20 49 4e 49 54 |...../* |Set INIT|
|00002940| 72 75 6e 20 66 6c 61 67 | 20 73 6f 20 63 6f 6e 74 |run flag| so cont|
|00002950| 72 6f 6c 20 70 61 6e 65 | 6c 20 77 69 6c 6c 20 6b |rol pane|l will k|
|00002960| 6e 6f 77 20 77 65 27 76 | 65 20 72 75 6e 20 2a 2f |now we'v|e run */|
|00002970| 0d 09 09 09 0d 09 09 09 | 09 6d 79 44 61 74 61 2e |........|.myData.|
|00002980| 49 4e 49 54 72 75 6e 20 | 3d 20 74 72 75 65 3b 0d |INITrun |= true;.|
|00002990| 09 09 7d 0d 09 09 0d 09 | 2f 2f 20 43 61 6c 6c 20 |..}.....|// Call |
|000029a0| 4d 79 49 6e 69 74 69 61 | 6c 69 7a 65 20 74 6f 20 |MyInitia|lize to |
|000029b0| 69 6e 69 74 69 61 6c 69 | 7a 65 20 76 61 72 69 61 |initiali|ze varia|
|000029c0| 62 6c 65 73 2c 20 61 6c | 6c 6f 63 61 74 65 20 6d |bles, al|locate m|
|000029d0| 65 6d 6f 72 79 2c 20 6c | 6f 61 64 20 72 65 73 6f |emory, l|oad reso|
|000029e0| 75 72 63 65 73 2c 0d 09 | 2f 2f 20 65 74 63 2e 20 |urces,..|// etc. |
|000029f0| 20 4d 79 49 6e 69 74 69 | 61 6c 69 7a 65 20 72 65 | MyIniti|alize re|
|00002a00| 74 75 72 6e 73 20 61 20 | 42 6f 6f 6c 65 61 6e 20 |turns a |Boolean |
|00002a10| 76 61 6c 75 65 20 70 75 | 74 20 69 6e 74 6f 20 73 |value pu|t into s|
|00002a20| 74 69 6c 6c 4f 4b 20 74 | 6f 20 69 6e 64 69 63 61 |tillOK t|o indica|
|00002a30| 74 65 0d 09 2f 2f 20 69 | 66 20 61 6c 6c 20 69 73 |te..// i|f all is|
|00002a40| 20 77 65 6c 6c 2c 20 61 | 6e 64 20 6d 61 79 20 61 | well, a|nd may a|
|00002a50| 6c 73 6f 20 6d 6f 64 69 | 66 79 20 74 68 65 20 76 |lso modi|fy the v|
|00002a60| 61 6c 75 65 73 20 69 6e | 20 69 6e 73 74 61 6c 6c |alues in| install|
|00002a70| 54 61 73 6b 20 61 6e 64 | 0d 09 2f 2f 20 73 68 6f |Task and|..// sho|
|00002a80| 77 53 74 61 72 74 75 70 | 49 63 6f 6e 20 74 6f 20 |wStartup|Icon to |
|00002a90| 61 66 66 65 63 74 20 77 | 68 65 74 68 65 72 20 6f |affect w|hether o|
|00002aa0| 72 20 6e 6f 74 20 74 68 | 65 20 66 69 6c 74 65 72 |r not th|e filter|
|00002ab0| 20 63 6f 64 65 20 69 73 | 20 61 63 74 75 61 6c 6c | code is| actuall|
|00002ac0| 79 0d 09 2f 2f 20 69 6e | 73 74 61 6c 6c 65 64 20 |y..// in|stalled |
|00002ad0| 61 6e 64 20 77 68 65 74 | 68 65 72 20 6f 72 20 6e |and whet|her or n|
|00002ae0| 6f 74 20 74 68 65 20 73 | 74 61 72 74 75 70 20 69 |ot the s|tartup i|
|00002af0| 63 6f 6e 20 69 73 20 73 | 68 6f 77 6e 2e 0d 09 0d |con is s|hown....|
|00002b00| 09 09 69 66 20 28 20 73 | 74 69 6c 6c 4f 4b 20 29 |..if ( s|tillOK )|
|00002b10| 0d 09 09 09 73 74 69 6c | 6c 4f 4b 20 3d 20 4d 79 |....stil|lOK = My|
|00002b20| 49 6e 69 74 69 61 6c 69 | 7a 65 28 20 26 6d 79 44 |Initiali|ze( &myD|
|00002b30| 61 74 61 2c 20 26 69 6e | 73 74 61 6c 6c 54 61 73 |ata, &in|stallTas|
|00002b40| 6b 2c 20 26 73 68 6f 77 | 53 74 61 72 74 75 70 49 |k, &show|StartupI|
|00002b50| 63 6f 6e 20 29 3b 0d 09 | 09 0d 09 2f 2a 09 53 74 |con );..|.../*.St|
|00002b60| 6f 72 65 20 74 68 65 20 | 61 64 64 72 65 73 73 20 |ore the |address |
|00002b70| 6f 66 20 6d 79 44 61 74 | 61 20 69 6e 20 61 20 72 |of myDat|a in a r|
|00002b80| 65 73 6f 75 72 63 65 20 | 74 68 61 74 20 63 61 6e |esource |that can|
|00002b90| 20 62 65 20 61 63 63 65 | 73 73 65 64 20 62 79 0d | be acce|ssed by.|
|00002ba0| 09 20 2a 09 6f 75 72 20 | 63 6f 6e 74 72 6f 6c 20 |. *.our |control |
|00002bb0| 70 61 6e 65 6c 2e 20 20 | 54 68 61 74 20 77 61 79 |panel. |That way|
|00002bc0| 2c 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 20 70 61 |, the co|ntrol pa|
|00002bd0| 6e 65 6c 20 63 61 6e 20 | 75 73 65 20 61 6e 64 20 |nel can |use and |
|00002be0| 63 68 61 6e 67 65 0d 09 | 20 2a 09 74 68 61 74 20 |change..| *.that |
|00002bf0| 64 61 74 61 2e 0d 09 20 | 2a 2f 0d 09 09 69 66 20 |data... |*/...if |
|00002c00| 28 20 73 74 69 6c 6c 4f | 4b 20 29 0d 09 09 7b 0d |( stillO|K )...{.|
|00002c10| 09 09 09 6d 65 6d 41 64 | 64 72 48 64 6c 09 09 09 |...memAd|drHdl...|
|00002c20| 74 68 65 4d 65 6d 41 64 | 64 72 3b 09 09 2f 2a 20 |theMemAd|dr;../* |
|00002c30| 72 65 73 6f 75 72 63 65 | 20 75 73 65 64 20 74 6f |resource| used to|
|00002c40| 20 68 6f 6c 64 20 74 68 | 65 20 2a 2f 0d 09 09 09 | hold th|e */....|
|00002c50| 09 09 09 09 09 09 09 09 | 09 2f 2a 20 61 64 64 72 |........|./* addr|
|00002c60| 20 6f 66 20 74 68 65 20 | 64 61 74 61 20 73 74 72 | of the |data str|
|00002c70| 75 63 74 75 72 65 20 2a | 2f 0d 09 09 09 09 09 09 |ucture *|/.......|
|00002c80| 09 09 09 09 09 09 2f 2a | 20 73 68 61 72 65 64 20 |....../*| shared |
|00002c90| 77 69 74 68 20 74 68 65 | 20 63 64 65 76 20 2a 2f |with the| cdev */|
|00002ca0| 0d 09 0d 09 09 09 2f 2f | 20 6c 6f 61 64 20 74 68 |......//| load th|
|00002cb0| 65 20 65 78 69 73 74 69 | 6e 67 20 72 65 73 6f 75 |e existi|ng resou|
|00002cc0| 72 63 65 20 73 6f 20 77 | 65 20 63 61 6e 20 63 68 |rce so w|e can ch|
|00002cd0| 61 6e 67 65 20 69 74 0d | 09 09 09 0d 09 09 09 74 |ange it.|.......t|
|00002ce0| 68 65 4d 65 6d 41 64 64 | 72 20 3d 20 28 6d 65 6d |heMemAdd|r = (mem|
|00002cf0| 41 64 64 72 48 64 6c 29 | 47 65 74 31 52 65 73 6f |AddrHdl)|Get1Reso|
|00002d00| 75 72 63 65 28 20 6b 4d | 65 6d 41 64 64 72 54 79 |urce( kM|emAddrTy|
|00002d10| 70 65 2c 20 6b 4d 65 6d | 41 64 64 72 49 44 20 29 |pe, kMem|AddrID )|
|00002d20| 3b 0d 09 09 09 69 66 20 | 28 20 74 68 65 4d 65 6d |;....if |( theMem|
|00002d30| 41 64 64 72 20 29 09 2f | 2a 20 67 6f 74 20 74 68 |Addr )./|* got th|
|00002d40| 65 20 72 65 73 6f 75 72 | 63 65 20 2a 2f 0d 09 09 |e resour|ce */...|
|00002d50| 09 7b 0d 09 09 09 09 28 | 2a 74 68 65 4d 65 6d 41 |.{.....(|*theMemA|
|00002d60| 64 64 72 29 2d 3e 74 68 | 65 41 64 64 72 20 3d 20 |ddr)->th|eAddr = |
|00002d70| 28 6c 6f 6e 67 29 28 26 | 6d 79 44 61 74 61 29 3b |(long)(&|myData);|
|00002d80| 20 2f 2a 20 61 64 64 72 | 20 6f 66 20 6d 79 44 61 | /* addr| of myDa|
|00002d90| 74 61 20 2a 2f 0d 09 09 | 09 09 43 68 61 6e 67 65 |ta */...|..Change|
|00002da0| 64 52 65 73 6f 75 72 63 | 65 28 20 28 48 61 6e 64 |dResourc|e( (Hand|
|00002db0| 6c 65 29 74 68 65 4d 65 | 6d 41 64 64 72 20 29 3b |le)theMe|mAddr );|
|00002dc0| 0d 09 09 09 09 57 72 69 | 74 65 52 65 73 6f 75 72 |.....Wri|teResour|
|00002dd0| 63 65 28 20 28 48 61 6e | 64 6c 65 29 74 68 65 4d |ce( (Han|dle)theM|
|00002de0| 65 6d 41 64 64 72 20 29 | 3b 09 2f 2a 20 77 72 69 |emAddr )|;./* wri|
|00002df0| 74 65 20 72 73 72 63 20 | 62 61 63 6b 20 74 6f 20 |te rsrc |back to |
|00002e00| 66 69 6c 65 20 2a 2f 0d | 09 09 09 7d 0d 09 09 09 |file */.|...}....|
|00002e10| 65 6c 73 65 09 2f 2f 20 | 72 65 73 6f 75 72 63 65 |else.// |resource|
|00002e20| 20 6e 6f 74 20 66 6f 75 | 6e 64 2c 20 73 6f 20 63 | not fou|nd, so c|
|00002e30| 72 65 61 74 65 20 61 20 | 6e 65 77 20 72 65 73 6f |reate a |new reso|
|00002e40| 75 72 63 65 0d 09 09 09 | 7b 0d 09 09 09 09 74 68 |urce....|{.....th|
|00002e50| 65 4d 65 6d 41 64 64 72 | 20 3d 20 28 6d 65 6d 41 |eMemAddr| = (memA|
|00002e60| 64 64 72 48 64 6c 29 4e | 65 77 48 61 6e 64 6c 65 |ddrHdl)N|ewHandle|
|00002e70| 53 79 73 43 6c 65 61 72 | 28 20 73 69 7a 65 6f 66 |SysClear|( sizeof|
|00002e80| 28 20 6c 6f 6e 67 20 29 | 20 29 3b 0d 09 09 09 09 |( long )| );.....|
|00002e90| 69 66 20 28 20 74 68 65 | 4d 65 6d 41 64 64 72 20 |if ( the|MemAddr |
|00002ea0| 29 0d 09 09 09 09 7b 0d | 09 09 09 09 09 28 2a 74 |).....{.|.....(*t|
|00002eb0| 68 65 4d 65 6d 41 64 64 | 72 29 2d 3e 74 68 65 41 |heMemAdd|r)->theA|
|00002ec0| 64 64 72 20 3d 20 28 6c | 6f 6e 67 29 28 26 6d 79 |ddr = (l|ong)(&my|
|00002ed0| 44 61 74 61 29 3b 20 2f | 2a 20 61 64 64 72 20 6f |Data); /|* addr o|
|00002ee0| 66 20 6d 79 44 61 74 61 | 20 2a 2f 0d 09 09 09 09 |f myData| */.....|
|00002ef0| 09 41 64 64 52 65 73 6f | 75 72 63 65 28 20 28 48 |.AddReso|urce( (H|
|00002f00| 61 6e 64 6c 65 29 74 68 | 65 4d 65 6d 41 64 64 72 |andle)th|eMemAddr|
|00002f10| 2c 20 6b 4d 65 6d 41 64 | 64 72 54 79 70 65 2c 20 |, kMemAd|drType, |
|00002f20| 6b 4d 65 6d 41 64 64 72 | 49 44 2c 0d 09 09 09 09 |kMemAddr|ID,.....|
|00002f30| 09 09 22 5c 70 53 68 61 | 72 65 64 20 4d 65 6d 6f |.."\pSha|red Memo|
|00002f40| 72 79 20 41 64 64 72 22 | 20 29 3b 09 09 2f 2a 20 |ry Addr"| );../* |
|00002f50| 61 64 64 20 61 20 72 73 | 72 63 20 74 6f 20 66 69 |add a rs|rc to fi|
|00002f60| 6c 65 20 2a 2f 0d 09 09 | 09 09 09 57 72 69 74 65 |le */...|...Write|
|00002f70| 52 65 73 6f 75 72 63 65 | 28 20 28 48 61 6e 64 6c |Resource|( (Handl|
|00002f80| 65 29 74 68 65 4d 65 6d | 41 64 64 72 20 29 3b 20 |e)theMem|Addr ); |
|00002f90| 2f 2a 20 77 72 69 74 65 | 20 69 74 20 6f 75 74 20 |/* write| it out |
|00002fa0| 74 6f 20 74 68 65 20 66 | 69 6c 65 20 2a 2f 0d 09 |to the f|ile */..|
|00002fb0| 09 09 09 7d 0d 09 09 09 | 09 65 6c 73 65 0d 09 09 |...}....|.else...|
|00002fc0| 09 09 09 73 74 69 6c 6c | 4f 4b 20 3d 20 66 61 6c |...still|OK = fal|
|00002fd0| 73 65 3b 09 2f 2a 20 75 | 6e 61 62 6c 65 20 74 6f |se;./* u|nable to|
|00002fe0| 20 61 6c 6c 6f 63 61 74 | 65 20 6d 65 6d 6f 72 79 | allocat|e memory|
|00002ff0| 20 66 6f 72 20 6e 65 77 | 20 72 73 72 63 20 2a 2f | for new| rsrc */|
|00003000| 0d 09 09 09 7d 0d 09 09 | 7d 0d 0d 09 2f 2a 09 53 |....}...|}.../*.S|
|00003010| 74 6f 72 65 20 74 68 65 | 20 61 64 64 72 65 73 73 |tore the| address|
|00003020| 20 6f 66 20 74 68 65 20 | 6e 65 78 74 20 4a 47 4e | of the |next JGN|
|00003030| 45 20 66 69 6c 74 65 72 | 20 66 6f 72 20 74 68 65 |E filter| for the|
|00003040| 20 74 61 73 6b 20 63 6f | 64 65 20 74 6f 0d 09 20 | task co|de to.. |
|00003050| 2a 09 6a 75 6d 70 20 74 | 6f 20 6c 61 74 65 72 20 |*.jump t|o later |
|00003060| 28 61 66 74 65 72 20 69 | 74 20 64 6f 65 73 20 69 |(after i|t does i|
|00003070| 74 73 20 6f 77 6e 20 70 | 72 6f 63 65 73 73 69 6e |ts own p|rocessin|
|00003080| 67 29 2e 0d 09 20 2a 2f | 0d 09 20 0d 09 20 09 74 |g)... */|.. .. .t|
|00003090| 68 65 4e 65 78 74 46 69 | 6c 74 65 72 20 3d 20 28 |heNextFi|lter = (|
|000030a0| 76 6f 69 64 2a 29 4a 47 | 4e 45 66 69 6c 74 65 72 |void*)JG|NEfilter|
|000030b0| 3b 09 2f 2a 20 73 61 76 | 65 20 6f 6c 64 20 66 69 |;./* sav|e old fi|
|000030c0| 6c 74 65 72 20 61 64 64 | 72 65 73 73 20 2a 2f 0d |lter add|ress */.|
|000030d0| 09 20 09 0d 09 2f 2a 09 | 4e 6f 77 20 77 65 20 61 |. .../*.|Now we a|
|000030e0| 63 74 75 61 6c 6c 79 20 | 69 6e 73 74 61 6c 6c 20 |ctually |install |
|000030f0| 74 68 65 20 66 69 6c 74 | 65 72 2e 20 2a 2f 0d 09 |the filt|er. */..|
|00003100| 0d 09 09 69 66 20 28 20 | 73 74 69 6c 6c 4f 4b 20 |...if ( |stillOK |
|00003110| 26 26 20 69 6e 73 74 61 | 6c 6c 54 61 73 6b 20 29 |&& insta|llTask )|
|00003120| 0d 09 09 7b 0d 09 09 09 | 4a 47 4e 45 66 69 6c 74 |...{....|JGNEfilt|
|00003130| 65 72 20 3d 20 28 76 6f | 69 64 2a 29 4d 79 54 61 |er = (vo|id*)MyTa|
|00003140| 73 6b 3b 0d 0d 09 09 09 | 6d 79 44 61 74 61 2e 74 |sk;.....|myData.t|
|00003150| 61 73 6b 49 6e 73 74 61 | 6c 6c 65 64 20 3d 20 74 |askInsta|lled = t|
|00003160| 72 75 65 3b 0d 09 09 7d | 0d 09 09 65 6c 73 65 0d |rue;...}|...else.|
|00003170| 09 09 7b 0d 09 09 09 6d | 79 44 61 74 61 2e 74 61 |..{....m|yData.ta|
|00003180| 73 6b 49 6e 73 74 61 6c | 6c 65 64 20 3d 20 66 61 |skInstal|led = fa|
|00003190| 6c 73 65 3b 0d 09 09 7d | 0d 09 0d 09 2f 2a 09 53 |lse;...}|..../*.S|
|000031a0| 68 6f 77 20 6f 75 72 20 | 69 63 6f 6e 20 69 6e 20 |how our |icon in |
|000031b0| 74 68 65 20 73 74 61 72 | 74 75 70 20 69 63 6f 6e |the star|tup icon|
|000031c0| 20 70 61 72 61 64 65 2e | 20 20 49 66 20 74 68 65 | parade.| If the|
|000031d0| 72 65 20 77 61 73 20 61 | 20 70 72 6f 62 6c 65 6d |re was a| problem|
|000031e0| 20 73 6f 6d 65 77 68 65 | 72 65 0d 09 20 2a 09 61 | somewhe|re.. *.a|
|000031f0| 6c 6f 6e 67 20 74 68 65 | 20 77 61 79 2c 20 77 65 |long the| way, we|
|00003200| 27 6c 6c 20 73 68 6f 77 | 20 74 68 65 20 69 63 6f |'ll show| the ico|
|00003210| 6e 20 65 76 65 6e 20 69 | 66 20 74 68 65 20 63 6f |n even i|f the co|
|00003220| 6e 74 72 6f 6c 20 70 61 | 6e 65 6c 20 73 61 79 73 |ntrol pa|nel says|
|00003230| 20 6e 6f 74 20 74 6f 2e | 0d 09 20 2a 2f 0d 0d 09 | not to.|.. */...|
|00003240| 09 69 66 20 28 20 73 68 | 6f 77 53 74 61 72 74 75 |.if ( sh|owStartu|
|00003250| 70 49 63 6f 6e 20 7c 7c | 20 28 20 21 73 74 69 6c |pIcon ||| ( !stil|
|00003260| 6c 4f 4b 20 29 20 29 0d | 09 09 7b 0d 09 09 09 69 |lOK ) ).|..{....i|
|00003270| 66 20 28 20 73 74 69 6c | 6c 4f 4b 20 29 0d 09 09 |f ( stil|lOK )...|
|00003280| 09 09 69 66 20 28 20 69 | 6e 73 74 61 6c 6c 54 61 |..if ( i|nstallTa|
|00003290| 73 6b 20 29 0d 09 09 09 | 09 09 53 68 6f 77 49 63 |sk )....|..ShowIc|
|000032a0| 6f 6e 46 61 6d 69 6c 79 | 28 20 6b 49 63 6f 6e 46 |onFamily|( kIconF|
|000032b0| 61 6d 69 6c 79 49 44 20 | 29 3b 0d 09 09 09 09 65 |amilyID |);.....e|
|000032c0| 6c 73 65 0d 09 09 09 09 | 09 53 68 6f 77 49 63 6f |lse.....|.ShowIco|
|000032d0| 6e 46 61 6d 69 6c 79 28 | 20 6b 4e 6f 41 63 74 69 |nFamily(| kNoActi|
|000032e0| 6f 6e 49 63 6f 6e 49 44 | 20 29 3b 0d 09 09 09 65 |onIconID| );....e|
|000032f0| 6c 73 65 0d 09 09 09 09 | 53 68 6f 77 49 63 6f 6e |lse.....|ShowIcon|
|00003300| 46 61 6d 69 6c 79 28 20 | 6b 58 49 63 6f 6e 49 44 |Family( |kXIconID|
|00003310| 20 29 3b 0d 09 09 7d 0d | 09 0d 09 2f 2a 20 49 66 | );...}.|.../* If|
|00003320| 20 6e 6f 74 20 73 74 69 | 6c 6c 20 4f 4b 20 6e 6f | not sti|ll OK no|
|00003330| 77 2c 20 75 6e 6c 6f 63 | 6b 20 74 68 69 73 20 63 |w, unloc|k this c|
|00003340| 6f 64 65 20 61 6e 64 20 | 6d 61 6b 65 20 69 74 20 |ode and |make it |
|00003350| 70 75 72 67 65 61 62 6c | 65 20 73 6f 20 69 74 20 |purgeabl|e so it |
|00003360| 64 6f 65 73 6e 27 74 20 | 2a 2f 0d 09 2f 2a 20 63 |doesn't |*/../* c|
|00003370| 6f 6e 74 69 6e 75 65 20 | 74 6f 20 74 61 6b 65 20 |ontinue |to take |
|00003380| 75 70 20 76 61 6c 75 61 | 62 6c 65 20 73 70 61 63 |up valua|ble spac|
|00003390| 65 20 69 6e 20 74 68 65 | 20 73 79 73 74 65 6d 20 |e in the| system |
|000033a0| 68 65 61 70 2e 20 2a 2f | 0d 09 0d 09 09 69 66 20 |heap. */|.....if |
|000033b0| 28 20 21 73 74 69 6c 6c | 4f 4b 20 29 0d 09 09 7b |( !still|OK )...{|
|000033c0| 0d 09 09 09 48 55 6e 6c | 6f 63 6b 28 20 6d 65 20 |....HUnl|ock( me |
|000033d0| 29 3b 0d 09 09 09 48 50 | 75 72 67 65 28 20 6d 65 |);....HP|urge( me|
|000033e0| 20 29 3b 0d 09 09 7d 0d | 09 09 0d 09 2f 2a 20 52 | );...}.|..../* R|
|000033f0| 65 73 74 6f 72 65 20 6f | 6c 64 20 41 34 20 76 61 |estore o|ld A4 va|
|00003400| 6c 75 65 20 2a 2f 0d 09 | 0d 09 09 52 65 73 74 6f |lue */..|...Resto|
|00003410| 72 65 41 34 28 29 3b 0d | 7d 0d 0d 23 69 6e 63 6c |reA4();.|}..#incl|
|00003420| 75 64 65 20 22 4d 79 49 | 6e 69 74 69 61 6c 69 7a |ude "MyI|nitializ|
|00003430| 65 2e 63 22 0d 0d 2f 2a | 20 6d 79 54 61 73 6b 20 |e.c"../*| myTask |
|00003440| 2a 2f 0d 2f 2f 0d 2f 2f | 20 54 68 69 73 20 69 73 |*/.//.//| This is|
|00003450| 20 74 68 65 20 22 66 69 | 6c 74 65 72 22 20 6f 72 | the "fi|lter" or|
|00003460| 20 22 74 61 73 6b 22 20 | 63 6f 64 65 20 74 68 61 | "task" |code tha|
|00003470| 74 20 67 65 74 73 20 63 | 61 6c 6c 65 64 20 65 76 |t gets c|alled ev|
|00003480| 65 72 79 20 74 69 6d 65 | 20 61 6e 20 65 76 65 6e |ery time| an even|
|00003490| 74 20 69 73 0d 2f 2f 20 | 72 65 74 75 72 6e 65 64 |t is.// |returned|
|000034a0| 20 74 6f 20 61 6e 20 61 | 70 70 6c 69 63 61 74 69 | to an a|pplicati|
|000034b0| 6f 6e 2e 20 20 54 68 69 | 73 20 72 6f 75 74 69 6e |on. Thi|s routin|
|000034c0| 65 20 69 73 20 6d 61 69 | 6e 6c 79 20 22 67 6c 75 |e is mai|nly "glu|
|000034d0| 65 22 20 63 6f 64 65 20 | 74 68 61 74 20 65 78 74 |e" code |that ext|
|000034e0| 72 61 63 74 73 0d 2f 2f | 20 74 68 65 20 69 6e 66 |racts.//| the inf|
|000034f0| 6f 72 6d 61 74 69 6f 6e | 20 77 65 20 6e 65 65 64 |ormation| we need|
|00003500| 20 66 72 6f 6d 20 74 68 | 65 20 73 74 61 63 6b 20 | from th|e stack |
|00003510| 61 6e 64 20 72 65 67 69 | 73 74 65 72 73 2c 20 63 |and regi|sters, c|
|00003520| 61 6c 6c 73 20 6f 74 68 | 65 72 20 66 69 6c 74 65 |alls oth|er filte|
|00003530| 72 73 20 74 68 61 74 0d | 2f 2f 20 61 72 65 20 69 |rs that.|// are i|
|00003540| 6e 73 74 61 6c 6c 65 64 | 2c 20 61 6e 64 20 73 61 |nstalled|, and sa|
|00003550| 76 65 73 20 74 68 65 20 | 72 65 67 69 73 74 65 72 |ves the |register|
|00003560| 73 2e 20 20 4d 6f 73 74 | 20 6f 66 20 6f 75 72 20 |s. Most| of our |
|00003570| 61 63 74 75 61 6c 20 77 | 6f 72 6b 20 69 73 20 64 |actual w|ork is d|
|00003580| 6f 6e 65 0d 2f 2f 20 65 | 6c 73 65 77 68 65 72 65 |one.// e|lsewhere|
|00003590| 20 69 6e 20 74 68 65 20 | 50 72 6f 63 65 73 73 45 | in the |ProcessE|
|000035a0| 76 74 20 72 6f 75 74 69 | 6e 65 2e 0d 0d 70 61 73 |vt routi|ne...pas|
|000035b0| 63 61 6c 20 76 6f 69 64 | 20 4d 79 54 61 73 6b 28 |cal void| MyTask(|
|000035c0| 20 76 6f 69 64 20 29 0d | 7b 0d 09 2f 2f 20 41 74 | void ).|{..// At|
|000035d0| 20 74 68 69 73 20 70 6f | 69 6e 74 3a 0d 09 2f 2f | this po|int:..//|
|000035e0| 09 09 2d 3e 20 6e 6f 20 | 73 74 61 63 6b 20 66 72 |..-> no |stack fr|
|000035f0| 61 6d 65 20 28 4c 49 4e | 4b 29 20 69 73 20 67 65 |ame (LIN|K) is ge|
|00003600| 6e 65 72 61 74 65 64 20 | 62 65 63 61 75 73 65 20 |nerated |because |
|00003610| 74 68 65 72 65 20 61 72 | 65 20 6e 6f 20 6c 6f 63 |there ar|e no loc|
|00003620| 61 6c 20 76 61 72 73 0d | 09 2f 2f 09 09 2d 3e 20 |al vars.|.//..-> |
|00003630| 74 68 65 72 65 20 69 73 | 20 61 20 72 65 74 75 72 |there is| a retur|
|00003640| 6e 20 76 61 6c 75 65 20 | 28 73 68 6f 72 74 2c 20 |n value |(short, |
|00003650| 32 20 62 79 74 65 73 29 | 20 6f 6e 20 74 68 65 20 |2 bytes)| on the |
|00003660| 73 74 61 63 6b 20 74 68 | 61 74 20 74 65 6c 6c 73 |stack th|at tells|
|00003670| 0d 09 2f 2f 09 09 09 74 | 68 65 20 73 79 73 74 65 |..//...t|he syste|
|00003680| 6d 20 69 66 20 69 74 20 | 73 68 6f 75 6c 64 20 61 |m if it |should a|
|00003690| 63 63 65 70 74 20 74 68 | 65 20 65 76 65 6e 74 20 |ccept th|e event |
|000036a0| 28 6e 6f 6e 7a 65 72 6f | 20 79 65 73 2f 7a 65 72 |(nonzero| yes/zer|
|000036b0| 6f 20 6e 6f 29 2e 0d 09 | 2f 2f 09 09 09 54 68 65 |o no)...|//...The|
|000036c0| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 64 65 63 6c | routine| is decl|
|000036d0| 61 72 65 64 20 77 69 74 | 68 20 61 20 76 6f 69 64 |ared wit|h a void|
|000036e0| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 62 65 | return |value be|
|000036f0| 63 61 75 73 65 20 77 65 | 27 72 65 0d 09 2f 2f 09 |cause we|'re..//.|
|00003700| 09 09 67 6f 69 6e 67 20 | 74 6f 20 73 65 74 20 74 |..going |to set t|
|00003710| 68 65 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 |he retur|n value |
|00003720| 6d 61 6e 75 61 6c 6c 79 | 20 77 68 65 6e 20 77 65 |manually| when we|
|00003730| 20 72 65 74 75 72 6e 2e | 0d 09 2f 2f 09 09 2d 3e | return.|..//..->|
|00003740| 20 6f 6e 20 74 6f 70 20 | 6f 66 20 74 68 65 20 72 | on top |of the r|
|00003750| 65 74 75 72 6e 20 76 61 | 6c 75 65 20 69 73 20 74 |eturn va|lue is t|
|00003760| 68 65 20 72 65 74 75 72 | 6e 20 61 64 64 72 65 73 |he retur|n addres|
|00003770| 73 20 28 34 20 62 79 74 | 65 73 29 2e 20 20 54 68 |s (4 byt|es). Th|
|00003780| 69 73 0d 09 2f 2f 09 09 | 09 69 73 20 74 68 65 20 |is..//..|.is the |
|00003790| 22 74 6f 70 22 20 6f 66 | 20 74 68 65 20 73 74 61 |"top" of| the sta|
|000037a0| 63 6b 20 72 69 67 68 74 | 20 6e 6f 77 2e 0d 09 2f |ck right| now.../|
|000037b0| 2f 09 09 2d 3e 20 6f 6e | 20 65 6e 74 72 79 2c 20 |/..-> on| entry, |
|000037c0| 72 65 67 69 73 74 65 72 | 20 41 31 20 70 6f 69 6e |register| A1 poin|
|000037d0| 74 73 20 74 6f 20 74 68 | 65 20 65 76 65 6e 74 20 |ts to th|e event |
|000037e0| 72 65 63 6f 72 64 0d 09 | 2f 2f 09 09 2d 3e 20 72 |record..|//..-> r|
|000037f0| 65 67 69 73 74 65 72 20 | 44 30 20 63 6f 6e 74 61 |egister |D0 conta|
|00003800| 69 6e 73 20 74 68 65 20 | 22 72 65 74 75 72 6e 20 |ins the |"return |
|00003810| 76 61 6c 75 65 22 20 74 | 68 61 74 20 74 65 6c 6c |value" t|hat tell|
|00003820| 73 20 75 73 20 77 68 65 | 74 68 65 72 0d 09 2f 2f |s us whe|ther..//|
|00003830| 09 09 09 6f 72 20 6e 6f | 74 20 77 65 20 61 63 74 |...or no|t we act|
|00003840| 75 61 6c 6c 79 20 68 61 | 76 65 20 61 6e 20 65 76 |ually ha|ve an ev|
|00003850| 65 6e 74 2e 20 54 68 69 | 73 20 69 73 20 69 6e 64 |ent. Thi|s is ind|
|00003860| 69 63 61 74 65 64 20 62 | 79 20 74 68 65 0d 09 2f |icated b|y the../|
|00003870| 2f 09 09 09 68 69 67 68 | 20 62 79 74 65 20 6f 66 |/...high| byte of|
|00003880| 20 74 68 65 20 6c 6f 77 | 20 77 6f 72 64 20 6f 66 | the low| word of|
|00003890| 20 74 68 61 74 20 72 65 | 67 69 73 74 65 72 2e 0d | that re|gister..|
|000038a0| 09 2f 2f 0d 09 2f 2f 09 | 09 7c 20 70 72 65 76 20 |.//..//.|.| prev |
|000038b0| 73 74 61 63 6b 20 63 6f | 6e 74 65 6e 74 73 09 09 |stack co|ntents..|
|000038c0| 7c 0d 09 2f 2f 09 09 7c | 2d 2d 2d 2d 2d 2d 2d 2d ||..//..||--------|
|000038d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000038e0| 2d 2d 2d 7c 0d 09 2f 2f | 09 09 7c 20 73 68 6f 72 |---|..//|..| shor|
|000038f0| 74 20 72 65 74 20 76 61 | 6c 75 65 20 32 20 62 79 |t ret va|lue 2 by|
|00003900| 74 65 73 09 7c 0d 09 2f | 2f 09 09 7c 2d 2d 2d 2d |tes.|../|/..|----|
|00003910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003920| 2d 2d 2d 2d 2d 2d 2d 7c | 0d 09 2f 2f 09 09 7c 20 |-------||..//..| |
|00003930| 72 65 74 75 72 6e 20 61 | 64 64 72 65 73 73 09 09 |return a|ddress..|
|00003940| 09 7c 0d 09 2f 2f 09 09 | 7c 09 09 34 20 62 79 74 |.|..//..||..4 byt|
|00003950| 65 73 09 09 09 09 7c 0d | 09 2f 2f 09 09 7c 2d 2d |es....|.|.//..|--|
|00003960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 7c 09 3c 2d 20 73 74 |--------|-|.<- st|
|00003980| 61 63 6b 20 70 6f 69 6e | 74 65 72 20 28 53 50 29 |ack poin|ter (SP)|
|00003990| 0d 09 2f 2f 0d 09 0d 09 | 61 73 6d 0d 09 7b 0d 09 |..//....|asm..{..|
|000039a0| 09 4d 4f 56 45 4d 2e 4c | 09 41 30 2d 41 36 2f 44 |.MOVEM.L|.A0-A6/D|
|000039b0| 31 2d 44 37 2c 2d 28 53 | 50 29 09 09 3b 53 41 56 |1-D7,-(S|P)..;SAV|
|000039c0| 45 20 52 45 47 49 53 54 | 45 52 53 0d 09 09 4d 4f |E REGIST|ERS...MO|
|000039d0| 56 45 2e 4c 09 53 50 2c | 41 32 09 09 09 09 09 3b |VE.L.SP,|A2.....;|
|000039e0| 43 4f 50 59 20 53 54 41 | 43 4b 20 50 54 52 20 54 |COPY STA|CK PTR T|
|000039f0| 4f 20 52 45 47 20 41 32 | 0d 09 09 41 44 44 2e 4c |O REG A2|...ADD.L|
|00003a00| 09 23 36 30 2c 41 32 09 | 09 09 09 09 3b 41 44 44 |.#60,A2.|....;ADD|
|00003a10| 20 36 30 20 54 4f 20 41 | 32 20 54 4f 20 47 45 54 | 60 TO A|2 TO GET|
|00003a20| 20 41 44 44 52 20 4f 46 | 20 52 45 54 55 52 4e 0d | ADDR OF| RETURN.|
|00003a30| 09 09 09 09 09 09 09 09 | 09 09 3b 56 41 4c 55 45 |........|..;VALUE|
|00003a40| 20 4f 4e 20 54 48 45 20 | 53 54 41 43 4b 0d 09 09 | ON THE |STACK...|
|00003a50| 4d 4f 56 45 2e 4c 09 41 | 31 2c 41 33 09 09 09 09 |MOVE.L.A|1,A3....|
|00003a60| 09 3b 43 4f 50 59 20 52 | 45 47 20 41 31 20 54 4f |.;COPY R|EG A1 TO|
|00003a70| 20 52 45 47 20 41 33 0d | 09 7d 0d 0d 09 2f 2f 09 | REG A3.|.}...//.|
|00003a80| 09 7c 20 70 72 65 76 20 | 73 74 61 63 6b 20 63 6f |.| prev |stack co|
|00003a90| 6e 74 65 6e 74 73 09 09 | 7c 0d 09 2f 2f 09 09 7c |ntents..||..//..||
|00003aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ab0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 7c 0d 09 2f 2f |--------|---|..//|
|00003ac0| 09 09 7c 20 73 68 6f 72 | 74 20 72 65 74 20 76 61 |..| shor|t ret va|
|00003ad0| 6c 75 65 20 32 20 62 79 | 74 65 73 09 7c 09 41 31 |lue 2 by|tes.|.A1|
|00003ae0| 20 2d 3e 20 45 76 65 6e | 74 20 52 65 63 6f 72 64 | -> Even|t Record|
|00003af0| 0d 09 2f 2f 09 09 7c 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..//..|-|--------|
|00003b00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b10| 2d 2d 7c 09 41 33 20 2d | 3e 20 45 76 65 6e 74 20 |--|.A3 -|> Event |
|00003b20| 52 65 63 6f 72 64 0d 09 | 2f 2f 09 09 7c 20 72 65 |Record..|//..| re|
|00003b30| 74 75 72 6e 20 61 64 64 | 72 65 73 73 09 09 09 7c |turn add|ress...||
|00003b40| 0d 09 2f 2f 09 09 7c 09 | 09 34 20 62 79 74 65 73 |..//..|.|.4 bytes|
|00003b50| 09 09 09 09 7c 09 41 32 | 20 2d 3e 20 52 65 74 75 |....|.A2| -> Retu|
|00003b60| 72 6e 20 76 61 6c 75 65 | 0d 09 2f 2f 09 09 7c 2d |rn value|..//..|-|
|00003b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 7c 0d 09 2f 2f 09 |--------|--|..//.|
|00003b90| 09 7c 20 09 09 09 09 09 | 09 09 7c 0d 09 2f 2f 09 |.| .....|..|..//.|
|00003ba0| 09 7c 20 73 61 76 65 64 | 20 72 65 67 69 73 74 65 |.| saved| registe|
|00003bb0| 72 73 09 09 09 7c 0d 09 | 2f 2f 09 09 7c 20 09 09 |rs...|..|//..| ..|
|00003bc0| 35 36 20 62 79 74 65 73 | 09 09 09 7c 0d 09 2f 2f |56 bytes|...|..//|
|00003bd0| 09 09 7c 20 09 09 34 20 | 62 79 74 65 73 20 70 65 |..| ..4 |bytes pe|
|00003be0| 72 09 09 09 7c 0d 09 2f | 2f 09 09 7c 20 09 09 72 |r...|../|/..| ..r|
|00003bf0| 65 67 69 73 74 65 72 20 | 73 61 76 65 64 09 09 7c |egister |saved..||
|00003c00| 0d 09 2f 2f 09 09 7c 20 | 09 09 09 09 09 09 09 7c |..//..| |.......||
|00003c10| 0d 09 2f 2f 09 09 7c 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..//..|-|--------|
|00003c20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c30| 2d 2d 7c 09 3c 2d 20 73 | 74 61 63 6b 20 70 6f 69 |--|.<- s|tack poi|
|00003c40| 6e 74 65 72 20 28 53 50 | 29 0d 09 2f 2f 0d 09 0d |nter (SP|)..//...|
|00003c50| 09 2f 2f 20 53 65 74 20 | 75 70 20 66 6f 72 20 61 |.// Set |up for a|
|00003c60| 63 63 65 73 73 20 74 6f | 20 67 6c 6f 62 61 6c 20 |ccess to| global |
|00003c70| 76 61 72 69 61 62 6c 65 | 73 20 74 68 72 6f 75 67 |variable|s throug|
|00003c80| 68 20 72 65 67 69 73 74 | 65 72 20 41 34 2e 0d 09 |h regist|er A4...|
|00003c90| 2f 2f 20 54 68 69 73 20 | 70 72 6f 63 65 73 73 20 |// This |process |
|00003ca0| 75 73 65 73 20 72 65 67 | 69 73 74 65 72 20 41 31 |uses reg|ister A1|
|00003cb0| 20 61 6e 64 20 73 65 74 | 73 20 72 65 67 69 73 74 | and set|s regist|
|00003cc0| 65 72 20 41 34 20 74 6f | 20 70 6f 69 6e 74 0d 09 |er A4 to| point..|
|00003cd0| 2f 2f 20 74 6f 20 6f 75 | 72 20 67 6c 6f 62 61 6c |// to ou|r global|
|00003ce0| 20 76 61 72 69 61 62 6c | 65 73 20 61 72 65 61 2e | variabl|es area.|
|00003cf0| 0d 09 0d 09 09 53 65 74 | 55 70 41 34 28 29 3b 0d |.....Set|UpA4();.|
|00003d00| 09 0d 09 61 73 6d 0d 09 | 7b 0d 09 09 4d 4f 56 45 |...asm..|{...MOVE|
|00003d10| 2e 4c 09 41 33 2c 41 31 | 09 09 09 09 09 3b 52 45 |.L.A3,A1|.....;RE|
|00003d20| 53 54 4f 52 45 20 52 45 | 47 20 41 31 20 46 52 4f |STORE RE|G A1 FRO|
|00003d30| 4d 20 52 45 47 20 41 33 | 20 53 4f 20 49 54 0d 09 |M REG A3| SO IT..|
|00003d40| 09 09 09 09 09 09 09 09 | 09 3b 41 47 41 49 4e 20 |........|.;AGAIN |
|00003d50| 50 4f 49 4e 54 53 20 54 | 4f 20 45 56 45 4e 54 20 |POINTS T|O EVENT |
|00003d60| 52 45 43 4f 52 44 0d 09 | 09 4d 4f 56 45 2e 4c 09 |RECORD..|.MOVE.L.|
|00003d70| 41 31 2c 6d 79 45 76 74 | 50 74 72 09 09 09 09 3b |A1,myEvt|Ptr....;|
|00003d80| 50 55 54 20 45 56 45 4e | 54 20 50 54 52 20 49 4e |PUT EVEN|T PTR IN|
|00003d90| 54 4f 20 47 4c 4f 42 41 | 4c 20 6d 79 45 76 74 50 |TO GLOBA|L myEvtP|
|00003da0| 74 72 0d 09 09 4d 4f 56 | 45 2e 4c 09 41 32 2c 6d |tr...MOV|E.L.A2,m|
|00003db0| 79 52 65 74 75 72 6e 56 | 61 6c 09 09 09 3b 53 54 |yReturnV|al...;ST|
|00003dc0| 4f 52 45 20 41 44 44 52 | 20 4f 46 20 52 45 54 55 |ORE ADDR| OF RETU|
|00003dd0| 52 4e 20 56 41 4c 55 45 | 20 49 4e 20 54 48 45 0d |RN VALUE| IN THE.|
|00003de0| 09 09 09 09 09 09 09 09 | 09 09 3b 47 4c 4f 42 41 |........|..;GLOBA|
|00003df0| 4c 20 6d 79 52 65 74 75 | 72 6e 56 61 6c 0d 09 7d |L myRetu|rnVal..}|
|00003e00| 0d 0d 09 2f 2f 09 09 7c | 20 70 72 65 76 20 73 74 |...//..|| prev st|
|00003e10| 61 63 6b 20 63 6f 6e 74 | 65 6e 74 73 09 09 7c 0d |ack cont|ents..|.|
|00003e20| 09 2f 2f 09 09 7c 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.//..|--|--------|
|00003e30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e40| 2d 7c 0d 09 2f 2f 09 09 | 7c 20 73 68 6f 72 74 20 |-|..//..|| short |
|00003e50| 72 65 74 20 76 61 6c 75 | 65 20 32 20 62 79 74 65 |ret valu|e 2 byte|
|00003e60| 73 09 7c 09 41 31 20 2d | 3e 20 45 76 65 6e 74 20 |s.|.A1 -|> Event |
|00003e70| 52 65 63 6f 72 64 0d 09 | 2f 2f 09 09 7c 2d 2d 2d |Record..|//..|---|
|00003e80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e90| 2d 2d 2d 2d 2d 2d 2d 2d | 7c 09 41 33 20 2d 3e 20 |--------||.A3 -> |
|00003ea0| 45 76 65 6e 74 20 52 65 | 63 6f 72 64 0d 09 2f 2f |Event Re|cord..//|
|00003eb0| 09 09 7c 20 72 65 74 75 | 72 6e 20 61 64 64 72 65 |..| retu|rn addre|
|00003ec0| 73 73 09 09 09 7c 0d 09 | 2f 2f 09 09 7c 09 09 34 |ss...|..|//..|..4|
|00003ed0| 20 62 79 74 65 73 09 09 | 09 09 7c 09 41 32 20 2d | bytes..|..|.A2 -|
|00003ee0| 3e 20 52 65 74 75 72 6e | 20 76 61 6c 75 65 0d 09 |> Return| value..|
|00003ef0| 2f 2f 09 09 7c 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//..|---|--------|
|00003f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f10| 7c 0d 09 2f 2f 09 09 7c | 20 09 09 09 09 09 09 09 ||..//..|| .......|
|00003f20| 7c 0d 09 2f 2f 09 09 7c | 20 73 61 76 65 64 20 72 ||..//..|| saved r|
|00003f30| 65 67 69 73 74 65 72 73 | 09 09 09 7c 0d 09 2f 2f |egisters|...|..//|
|00003f40| 09 09 7c 20 09 09 35 36 | 20 62 79 74 65 73 09 09 |..| ..56| bytes..|
|00003f50| 09 7c 09 6d 79 45 76 74 | 50 74 72 20 2d 3e 20 45 |.|.myEvt|Ptr -> E|
|00003f60| 76 65 6e 74 20 52 65 63 | 6f 72 64 0d 09 2f 2f 09 |vent Rec|ord..//.|
|00003f70| 09 7c 20 09 09 34 20 62 | 79 74 65 73 20 70 65 72 |.| ..4 b|ytes per|
|00003f80| 09 09 09 7c 09 6d 79 52 | 65 74 75 72 6e 56 61 6c |...|.myR|eturnVal|
|00003f90| 20 2d 3e 20 52 65 74 75 | 72 6e 20 76 61 6c 75 65 | -> Retu|rn value|
|00003fa0| 0d 09 2f 2f 09 09 7c 20 | 09 09 72 65 67 69 73 74 |..//..| |..regist|
|00003fb0| 65 72 20 73 61 76 65 64 | 09 09 7c 0d 09 2f 2f 09 |er saved|..|..//.|
|00003fc0| 09 7c 20 09 09 09 09 09 | 09 09 7c 0d 09 2f 2f 09 |.| .....|..|..//.|
|00003fd0| 09 7c 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.|------|--------|
|00003fe0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 7c 0d 09 |--------|-----|..|
|00003ff0| 2f 2f 09 09 7c 20 6f 6c | 64 20 72 65 67 20 41 34 |//..| ol|d reg A4|
|00004000| 20 76 61 6c 75 65 09 09 | 09 7c 0d 09 2f 2f 09 09 | value..|.|..//..|
|00004010| 7c 20 09 09 34 20 62 79 | 74 65 73 09 09 09 09 7c || ..4 by|tes....||
|00004020| 0d 09 2f 2f 09 09 7c 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..//..|-|--------|
|00004030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004040| 2d 2d 7c 09 3c 2d 20 73 | 74 61 63 6b 20 70 6f 69 |--|.<- s|tack poi|
|00004050| 6e 74 65 72 20 28 53 50 | 29 0d 09 2f 2f 0d 09 0d |nter (SP|)..//...|
|00004060| 09 2f 2f 20 57 68 65 6e | 20 77 65 20 69 6e 69 74 |.// When| we init|
|00004070| 69 61 6c 6c 79 20 69 6e | 73 74 61 6c 6c 65 64 20 |ially in|stalled |
|00004080| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 61 73 20 |this rou|tine as |
|00004090| 61 20 66 69 6c 74 65 72 | 20 28 69 6e 20 74 68 65 |a filter| (in the|
|000040a0| 20 49 4e 49 54 29 2c 20 | 77 65 0d 09 2f 2f 20 63 | INIT), |we..// c|
|000040b0| 68 65 63 6b 65 64 20 74 | 6f 20 73 65 65 20 69 66 |hecked t|o see if|
|000040c0| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 20 66 69 6c | one or |more fil|
|000040d0| 74 65 72 73 20 77 61 73 | 20 61 6c 72 65 61 64 79 |ters was| already|
|000040e0| 20 69 6e 73 74 61 6c 6c | 65 64 2e 20 20 49 66 20 | install|ed. If |
|000040f0| 74 68 65 72 65 0d 09 2f | 2f 20 77 61 73 2c 20 74 |there../|/ was, t|
|00004100| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |he addre|ss of th|
|00004110| 65 20 6e 65 78 74 20 66 | 69 6c 74 65 72 20 69 73 |e next f|ilter is|
|00004120| 20 73 74 6f 72 65 64 20 | 69 6e 20 74 68 65 20 67 | stored |in the g|
|00004130| 6c 6f 62 61 6c 20 74 68 | 65 4e 65 78 74 46 69 6c |lobal th|eNextFil|
|00004140| 74 65 72 2e 0d 09 2f 2f | 0d 09 2f 2f 20 49 66 20 |ter...//|..// If |
|00004150| 74 68 65 72 65 20 69 73 | 20 61 20 6e 65 78 74 20 |there is| a next |
|00004160| 66 69 6c 74 65 72 2c 20 | 63 61 6c 6c 20 69 74 20 |filter, |call it |
|00004170| 6e 6f 77 2e 0d 09 2f 2f | 0d 09 2f 2f 20 49 74 20 |now...//|..// It |
|00004180| 69 73 20 74 68 65 20 68 | 69 67 68 20 62 79 74 65 |is the h|igh byte|
|00004190| 20 6f 66 20 74 68 65 20 | 76 61 6c 75 65 20 69 6e | of the |value in|
|000041a0| 20 44 30 20 74 68 61 74 | 20 69 73 20 69 6d 70 6f | D0 that| is impo|
|000041b0| 72 74 61 6e 74 2e 0d 09 | 0d 09 09 61 73 6d 0d 09 |rtant...|...asm..|
|000041c0| 09 7b 0d 09 09 09 4d 4f | 56 45 2e 57 09 44 30 2c |.{....MO|VE.W.D0,|
|000041d0| 73 74 69 6c 6c 48 61 73 | 45 76 74 09 09 3b 6d 6f |stillHas|Evt..;mo|
|000041e0| 76 65 20 44 30 20 74 6f | 20 67 6c 6f 62 61 6c 20 |ve D0 to| global |
|000041f0| 73 74 69 6c 6c 48 61 73 | 45 76 74 0d 09 09 7d 0d |stillHas|Evt...}.|
|00004200| 09 09 0d 09 09 69 66 20 | 28 20 74 68 65 4e 65 78 |.....if |( theNex|
|00004210| 74 46 69 6c 74 65 72 20 | 29 0d 09 09 7b 0d 09 09 |tFilter |)...{...|
|00004220| 09 61 73 6d 0d 09 09 09 | 7b 0d 09 09 09 09 4d 4f |.asm....|{.....MO|
|00004230| 56 45 2e 57 09 73 74 69 | 6c 6c 48 61 73 45 76 74 |VE.W.sti|llHasEvt|
|00004240| 2c 44 30 09 09 3b 6d 61 | 6b 65 20 73 75 72 65 20 |,D0..;ma|ke sure |
|00004250| 44 30 20 68 6f 6c 64 73 | 20 74 68 65 20 63 6f 72 |D0 holds| the cor|
|00004260| 72 65 63 74 20 76 61 6c | 75 65 0d 09 09 09 09 4d |rect val|ue.....M|
|00004270| 4f 56 45 2e 57 09 73 74 | 69 6c 6c 48 61 73 45 76 |OVE.W.st|illHasEv|
|00004280| 74 2c 2d 28 53 50 29 09 | 3b 61 6c 73 6f 20 63 6f |t,-(SP).|;also co|
|00004290| 70 79 20 74 68 65 20 76 | 61 6c 75 65 20 74 6f 20 |py the v|alue to |
|000042a0| 74 68 65 20 74 6f 70 20 | 6f 66 0d 09 09 09 09 09 |the top |of......|
|000042b0| 09 09 09 09 09 09 3b 74 | 68 65 20 73 74 61 63 6b |......;t|he stack|
|000042c0| 0d 09 09 09 7d 0d 09 09 | 09 0d 09 09 09 28 2a 74 |....}...|.....(*t|
|000042d0| 68 65 4e 65 78 74 46 69 | 6c 74 65 72 29 28 29 3b |heNextFi|lter)();|
|000042e0| 0d 09 09 09 0d 09 09 09 | 61 73 6d 0d 09 09 09 7b |........|asm....{|
|000042f0| 0d 09 09 09 09 4d 4f 56 | 45 2e 57 09 28 53 50 29 |.....MOV|E.W.(SP)|
|00004300| 2b 2c 73 74 69 6c 6c 48 | 61 73 45 76 74 09 09 3b |+,stillH|asEvt..;|
|00004310| 67 65 74 20 74 68 65 20 | 6e 65 77 20 72 65 74 75 |get the |new retu|
|00004320| 72 6e 20 76 61 6c 75 65 | 20 61 6e 64 0d 09 09 09 |rn value| and....|
|00004330| 09 4d 4f 56 45 2e 4c 09 | 6d 79 52 65 74 75 72 6e |.MOVE.L.|myReturn|
|00004340| 56 61 6c 2c 41 30 09 09 | 09 3b 63 6f 70 79 20 69 |Val,A0..|.;copy i|
|00004350| 74 20 74 6f 20 77 68 65 | 72 65 20 74 68 65 20 6f |t to whe|re the o|
|00004360| 6c 64 20 72 65 74 75 72 | 6e 0d 09 09 09 09 4d 4f |ld retur|n.....MO|
|00004370| 56 45 2e 57 09 73 74 69 | 6c 6c 48 61 73 45 76 74 |VE.W.sti|llHasEvt|
|00004380| 2c 28 41 30 29 09 09 3b | 76 61 6c 75 65 20 77 61 |,(A0)..;|value wa|
|00004390| 73 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 0d 09 |s on the| stack..|
|000043a0| 09 09 7d 0d 09 09 7d 0d | 09 0d 09 2f 2f 20 41 74 |..}...}.|...// At|
|000043b0| 20 74 68 69 73 20 70 6f | 69 6e 74 2c 20 73 74 69 | this po|int, sti|
|000043c0| 6c 6c 48 61 73 45 76 74 | 20 72 65 70 72 65 73 65 |llHasEvt| represe|
|000043d0| 6e 74 73 20 65 69 74 68 | 65 72 20 74 68 65 20 73 |nts eith|er the s|
|000043e0| 61 6d 65 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 |ame retu|rn value|
|000043f0| 20 77 65 0d 09 2f 2f 20 | 69 6e 69 74 69 61 6c 6c | we..// |initiall|
|00004400| 79 20 68 61 64 20 77 68 | 65 6e 20 77 65 20 73 74 |y had wh|en we st|
|00004410| 61 72 74 65 64 2c 20 6f | 72 20 74 68 65 20 72 65 |arted, o|r the re|
|00004420| 74 75 72 6e 20 76 61 6c | 75 65 20 66 72 6f 6d 20 |turn val|ue from |
|00004430| 74 68 65 20 6e 65 78 74 | 20 66 69 6c 74 65 72 0d |the next| filter.|
|00004440| 09 2f 2f 20 69 66 20 6f | 6e 65 20 77 61 73 20 63 |.// if o|ne was c|
|00004450| 61 6c 6c 65 64 2e 0d 09 | 2f 2f 0d 09 2f 2f 20 49 |alled...|//..// I|
|00004460| 66 20 77 65 20 61 72 65 | 20 73 74 69 6c 6c 20 77 |f we are| still w|
|00004470| 6f 72 6b 69 6e 67 20 77 | 69 74 68 20 61 20 76 61 |orking w|ith a va|
|00004480| 6c 69 64 20 65 76 65 6e | 74 20 74 68 65 6e 20 77 |lid even|t then w|
|00004490| 65 27 6c 6c 0d 09 2f 2f | 20 6e 6f 77 20 70 72 6f |e'll..//| now pro|
|000044a0| 63 65 73 73 20 74 68 65 | 20 65 76 65 6e 74 20 6f |cess the| event o|
|000044b0| 75 72 73 65 6c 76 65 73 | 20 61 6e 64 20 64 65 63 |urselves| and dec|
|000044c0| 69 64 65 20 69 66 20 77 | 65 20 77 61 6e 74 20 74 |ide if w|e want t|
|000044d0| 6f 20 69 6e 74 65 72 63 | 65 70 74 20 69 74 2e 0d |o interc|ept it..|
|000044e0| 09 0d 09 09 69 66 20 28 | 20 47 6f 6f 64 45 76 74 |....if (| GoodEvt|
|000044f0| 28 73 74 69 6c 6c 48 61 | 73 45 76 74 29 20 7c 7c |(stillHa|sEvt) |||
|00004500| 20 6b 50 72 6f 63 65 73 | 73 4e 75 6c 6c 45 76 74 | kProces|sNullEvt|
|00004510| 73 20 29 0d 09 09 09 69 | 6e 74 65 72 63 65 70 74 |s )....i|ntercept|
|00004520| 49 74 20 3d 20 50 72 6f | 63 65 73 73 45 76 74 28 |It = Pro|cessEvt(|
|00004530| 20 6d 79 45 76 74 50 74 | 72 20 29 3b 0d 09 09 65 | myEvtPt|r );...e|
|00004540| 6c 73 65 0d 09 09 09 69 | 6e 74 65 72 63 65 70 74 |lse....i|ntercept|
|00004550| 49 74 20 3d 20 66 61 6c | 73 65 3b 0d 09 0d 09 2f |It = fal|se;..../|
|00004560| 2f 20 41 66 74 65 72 20 | 74 68 65 20 6e 65 78 74 |/ After |the next|
|00004570| 20 66 69 6c 74 65 72 20 | 77 61 73 20 63 61 6c 6c | filter |was call|
|00004580| 65 64 2c 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |ed, the |return v|
|00004590| 61 6c 75 65 20 6f 6e 20 | 74 68 65 20 73 74 61 63 |alue on |the stac|
|000045a0| 6b 20 77 61 73 0d 09 2f | 2f 20 63 68 61 6e 67 65 |k was../|/ change|
|000045b0| 64 20 74 6f 20 72 65 66 | 6c 65 63 74 20 74 68 65 |d to ref|lect the|
|000045c0| 20 6e 65 77 20 72 65 73 | 75 6c 74 2e 20 20 57 65 | new res|ult. We|
|000045d0| 27 6c 6c 20 6f 6e 6c 79 | 20 6e 65 65 64 20 74 6f |'ll only| need to|
|000045e0| 20 63 68 61 6e 67 65 20 | 74 68 61 74 0d 09 2f 2f | change |that..//|
|000045f0| 20 72 65 73 75 6c 74 20 | 6e 6f 77 20 69 66 20 77 | result |now if w|
|00004600| 65 27 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 69 6e |e're goi|ng to in|
|00004610| 74 65 72 63 65 70 74 20 | 74 68 65 20 65 76 65 6e |tercept |the even|
|00004620| 74 2e 20 20 57 65 20 64 | 6f 20 74 68 61 74 20 62 |t. We d|o that b|
|00004630| 79 0d 09 2f 2f 20 6d 61 | 6b 69 6e 67 20 74 68 65 |y..// ma|king the|
|00004640| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 5a 45 | return |value ZE|
|00004650| 52 4f 2e 0d 09 0d 09 09 | 69 66 20 28 20 69 6e 74 |RO......|if ( int|
|00004660| 65 72 63 65 70 74 49 74 | 20 29 0d 09 09 7b 0d 09 |erceptIt| )...{..|
|00004670| 09 09 6d 79 45 76 74 50 | 74 72 2d 3e 77 68 61 74 |..myEvtP|tr->what|
|00004680| 20 3d 20 6e 75 6c 6c 45 | 76 65 6e 74 3b 0d 09 09 | = nullE|vent;...|
|00004690| 09 28 2a 6d 79 52 65 74 | 75 72 6e 56 61 6c 29 20 |.(*myRet|urnVal) |
|000046a0| 3d 20 30 3b 0d 09 09 7d | 0d 09 0d 09 2f 2f 20 43 |= 0;...}|....// C|
|000046b0| 6f 70 79 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |opy the |return v|
|000046c0| 61 6c 75 65 20 74 6f 20 | 72 65 67 69 73 74 65 72 |alue to |register|
|000046d0| 20 44 30 2e 20 20 44 30 | 20 61 6e 64 20 74 68 65 | D0. D0| and the|
|000046e0| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 6f 6e | return |value on|
|000046f0| 0d 09 2f 2f 20 74 68 65 | 20 73 74 61 63 6b 20 73 |..// the| stack s|
|00004700| 68 6f 75 6c 64 20 6d 69 | 72 72 6f 72 20 65 61 63 |hould mi|rror eac|
|00004710| 68 20 6f 74 68 65 72 20 | 77 68 65 6e 20 77 65 20 |h other |when we |
|00004720| 65 78 69 74 2e 0d 09 0d | 09 09 61 73 6d 0d 09 09 |exit....|..asm...|
|00004730| 7b 0d 09 09 09 4d 4f 56 | 45 2e 4c 09 6d 79 52 65 |{....MOV|E.L.myRe|
|00004740| 74 75 72 6e 56 61 6c 2c | 41 32 09 09 3b 67 65 74 |turnVal,|A2..;get|
|00004750| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 61 64 | return |value ad|
|00004760| 64 72 20 6f 6e 20 73 74 | 61 63 6b 0d 09 09 09 43 |dr on st|ack....C|
|00004770| 4c 52 2e 4c 09 44 30 09 | 09 09 09 09 3b 63 6c 65 |LR.L.D0.|....;cle|
|00004780| 61 72 20 6f 75 74 20 72 | 65 67 69 73 74 65 72 20 |ar out r|egister |
|00004790| 44 30 20 66 69 72 73 74 | 0d 09 09 09 4d 4f 56 45 |D0 first|....MOVE|
|000047a0| 2e 57 09 28 41 32 29 2c | 44 30 09 09 09 09 3b 63 |.W.(A2),|D0....;c|
|000047b0| 6f 70 79 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |opy the |return v|
|000047c0| 61 6c 75 65 20 74 6f 20 | 44 30 0d 09 09 7d 0d 09 |alue to |D0...}..|
|000047d0| 09 0d 09 2f 2f 20 4e 6f | 77 20 72 65 73 74 6f 72 |...// No|w restor|
|000047e0| 65 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 76 |e the pr|evious v|
|000047f0| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 41 34 20 72 |alue of |the A4 r|
|00004800| 65 67 69 73 74 65 72 2e | 20 20 57 65 27 6c 6c 20 |egister.| We'll |
|00004810| 6e 6f 20 6c 6f 6e 67 65 | 72 0d 09 2f 2f 20 68 61 |no longe|r..// ha|
|00004820| 76 65 20 61 63 63 65 73 | 73 20 74 6f 20 6f 75 72 |ve acces|s to our|
|00004830| 20 67 6c 6f 62 61 6c 73 | 2e 0d 09 0d 09 09 52 65 | globals|......Re|
|00004840| 73 74 6f 72 65 41 34 28 | 29 3b 0d 0d 09 2f 2f 09 |storeA4(|);...//.|
|00004850| 09 7c 20 70 72 65 76 20 | 73 74 61 63 6b 20 63 6f |.| prev |stack co|
|00004860| 6e 74 65 6e 74 73 09 09 | 7c 0d 09 2f 2f 09 09 7c |ntents..||..//..||
|00004870| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004880| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 7c 0d 09 2f 2f |--------|---|..//|
|00004890| 09 09 7c 20 73 68 6f 72 | 74 20 72 65 74 20 76 61 |..| shor|t ret va|
|000048a0| 6c 75 65 20 32 20 62 79 | 74 65 73 09 7c 0d 09 2f |lue 2 by|tes.|../|
|000048b0| 2f 09 09 7c 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/..|----|--------|
|000048c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 7c |--------|-------||
|000048d0| 0d 09 2f 2f 09 09 7c 20 | 72 65 74 75 72 6e 20 61 |..//..| |return a|
|000048e0| 64 64 72 65 73 73 09 09 | 09 7c 0d 09 2f 2f 09 09 |ddress..|.|..//..|
|000048f0| 7c 09 09 34 20 62 79 74 | 65 73 09 09 09 09 7c 0d ||..4 byt|es....|.|
|00004900| 09 2f 2f 09 09 7c 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.//..|--|--------|
|00004910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004920| 2d 7c 0d 09 2f 2f 09 09 | 7c 20 09 09 09 09 09 09 |-|..//..|| ......|
|00004930| 09 7c 0d 09 2f 2f 09 09 | 7c 20 73 61 76 65 64 20 |.|..//..|| saved |
|00004940| 72 65 67 69 73 74 65 72 | 73 09 09 09 7c 0d 09 2f |register|s...|../|
|00004950| 2f 09 09 7c 20 09 09 35 | 36 20 62 79 74 65 73 09 |/..| ..5|6 bytes.|
|00004960| 09 09 7c 0d 09 2f 2f 09 | 09 7c 20 09 09 34 20 62 |..|..//.|.| ..4 b|
|00004970| 79 74 65 73 20 70 65 72 | 09 09 09 7c 0d 09 2f 2f |ytes per|...|..//|
|00004980| 09 09 7c 20 09 09 72 65 | 67 69 73 74 65 72 20 73 |..| ..re|gister s|
|00004990| 61 76 65 64 09 09 7c 0d | 09 2f 2f 09 09 7c 20 09 |aved..|.|.//..| .|
|000049a0| 09 09 09 09 09 09 7c 0d | 09 2f 2f 09 09 7c 2d 2d |......|.|.//..|--|
|000049b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000049c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 7c 09 3c 2d 20 73 74 |--------|-|.<- st|
|000049d0| 61 63 6b 20 70 6f 69 6e | 74 65 72 20 28 53 50 29 |ack poin|ter (SP)|
|000049e0| 0d 09 2f 2f 0d 09 0d 09 | 61 73 6d 0d 09 7b 0d 09 |..//....|asm..{..|
|000049f0| 09 4d 4f 56 45 4d 2e 4c | 09 09 28 53 50 29 2b 2c |.MOVEM.L|..(SP)+,|
|00004a00| 20 41 30 2d 41 36 2f 44 | 31 2d 44 37 09 09 3b 52 | A0-A6/D|1-D7..;R|
|00004a10| 45 53 54 4f 52 45 20 53 | 41 56 45 44 20 52 45 47 |ESTORE S|AVED REG|
|00004a20| 49 53 54 45 52 53 0d 09 | 7d 0d 0d 09 2f 2f 09 09 |ISTERS..|}...//..|
|00004a30| 7c 20 70 72 65 76 20 73 | 74 61 63 6b 20 63 6f 6e || prev s|tack con|
|00004a40| 74 65 6e 74 73 09 09 7c | 0d 09 2f 2f 09 09 7c 2d |tents..||..//..|-|
|00004a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 7c 0d 09 2f 2f 09 |--------|--|..//.|
|00004a70| 09 7c 20 73 68 6f 72 74 | 20 72 65 74 20 76 61 6c |.| short| ret val|
|00004a80| 75 65 20 32 20 62 79 74 | 65 73 09 7c 0d 09 2f 2f |ue 2 byt|es.|..//|
|00004a90| 09 09 7c 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..|-----|--------|
|00004aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 7c 0d |--------|------|.|
|00004ab0| 09 2f 2f 09 09 7c 20 72 | 65 74 75 72 6e 20 61 64 |.//..| r|eturn ad|
|00004ac0| 64 72 65 73 73 09 09 09 | 7c 0d 09 2f 2f 09 09 7c |dress...||..//..||
|00004ad0| 09 09 34 20 62 79 74 65 | 73 09 09 09 09 7c 0d 09 |..4 byte|s....|..|
|00004ae0| 2f 2f 09 09 7c 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//..|---|--------|
|00004af0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004b00| 7c 09 3c 2d 20 73 74 61 | 63 6b 20 70 6f 69 6e 74 ||.<- sta|ck point|
|00004b10| 65 72 20 28 53 50 29 0d | 09 2f 2f 0d 09 2f 2f 20 |er (SP).|.//..// |
|00004b20| 41 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |At the e|nd of th|
|00004b30| 69 73 20 72 6f 75 74 69 | 6e 65 2c 20 74 68 65 20 |is routi|ne, the |
|00004b40| 63 6f 6d 70 69 6c 65 72 | 20 61 75 74 6f 6d 61 74 |compiler| automat|
|00004b50| 69 63 61 6c 6c 79 20 69 | 6e 73 65 72 74 73 20 61 |ically i|nserts a|
|00004b60| 6e 20 52 54 53 0d 09 2f | 2f 20 63 6f 6d 6d 61 6e |n RTS../|/ comman|
|00004b70| 64 20 77 68 69 63 68 20 | 74 61 6b 65 73 20 74 68 |d which |takes th|
|00004b80| 65 20 72 65 74 75 72 6e | 20 61 64 64 72 65 73 73 |e return| address|
|00004b90| 20 6f 66 66 20 74 68 65 | 20 73 74 61 63 6b 20 61 | off the| stack a|
|00004ba0| 6e 64 20 6a 75 6d 70 73 | 20 74 6f 20 69 74 0d 09 |nd jumps| to it..|
|00004bb0| 2f 2f 20 6c 65 61 76 69 | 6e 67 20 6f 6e 6c 79 20 |// leavi|ng only |
|00004bc0| 74 68 65 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 |the retu|rn value|
|00004bd0| 20 6f 6e 20 74 68 65 20 | 73 74 61 63 6b 20 28 70 | on the |stack (p|
|00004be0| 6c 75 73 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 |lus the |previous|
|00004bf0| 20 63 6f 6e 74 65 6e 74 | 73 29 2e 0d 7d 0d 0d 0d | content|s)..}...|
|00004c00| 2f 2a 09 54 68 65 20 50 | 72 6f 63 65 73 73 45 76 |/*.The P|rocessEv|
|00004c10| 74 20 72 6f 75 74 69 6e | 65 3a 0d 20 2a 09 09 a5 |t routin|e:. *...|
|00004c20| 20 63 68 65 63 6b 73 20 | 74 68 65 20 63 6f 6e 74 | checks |the cont|
|00004c30| 72 6f 6c 20 70 61 6e 65 | 6c 20 74 6f 20 73 65 65 |rol pane|l to see|
|00004c40| 20 69 66 20 69 74 20 69 | 73 20 22 6f 6e 22 0d 20 | if it i|s "on". |
|00004c50| 2a 09 09 a5 20 63 61 6c | 6c 73 20 4d 79 45 76 74 |*... cal|ls MyEvt|
|00004c60| 48 61 6e 64 6c 65 72 20 | 74 6f 20 70 72 6f 63 65 |Handler |to proce|
|00004c70| 73 73 20 74 68 65 20 65 | 76 65 6e 74 20 61 6e 64 |ss the e|vent and|
|00004c80| 20 73 65 65 20 69 66 20 | 69 74 20 73 68 6f 75 6c | see if |it shoul|
|00004c90| 64 20 62 65 0d 20 2a 09 | 09 09 69 6e 74 65 72 63 |d be. *.|..interc|
|00004ca0| 65 70 74 65 64 2e 0d 20 | 2a 09 09 a5 20 69 66 20 |epted.. |*... if |
|00004cb0| 74 68 65 20 65 76 65 6e | 74 20 69 73 20 74 6f 20 |the even|t is to |
|00004cc0| 62 65 20 69 6e 74 65 72 | 63 65 70 74 65 64 2c 20 |be inter|cepted, |
|00004cd0| 50 72 6f 63 65 73 73 45 | 76 74 20 72 65 74 75 72 |ProcessE|vt retur|
|00004ce0| 6e 73 20 74 72 75 65 2e | 0d 20 2a 09 09 09 4f 74 |ns true.|. *...Ot|
|00004cf0| 68 65 72 77 69 73 65 2c | 20 69 74 20 72 65 74 75 |herwise,| it retu|
|00004d00| 72 6e 73 20 66 61 6c 73 | 65 2e 0d 20 2a 2f 0d 42 |rns fals|e.. */.B|
|00004d10| 6f 6f 6c 65 61 6e 20 50 | 72 6f 63 65 73 73 45 76 |oolean P|rocessEv|
|00004d20| 74 28 20 45 76 65 6e 74 | 52 65 63 6f 72 64 20 2a |t( Event|Record *|
|00004d30| 65 76 65 6e 74 20 29 0d | 7b 0d 09 42 6f 6f 6c 65 |event ).|{..Boole|
|00004d40| 61 6e 09 09 09 69 6e 74 | 65 72 63 65 70 74 3b 0d |an...int|ercept;.|
|00004d50| 09 09 09 09 09 09 09 09 | 09 0d 09 2f 2a 09 49 66 |........|.../*.If|
|00004d60| 20 74 68 65 20 63 6f 6e | 74 72 6f 6c 20 70 61 6e | the con|trol pan|
|00004d70| 65 6c 20 73 65 74 74 69 | 6e 67 20 69 73 20 6e 6f |el setti|ng is no|
|00004d80| 74 20 4f 4e 2c 20 77 65 | 20 74 61 6b 65 20 6e 6f |t ON, we| take no|
|00004d90| 20 66 75 72 74 68 65 72 | 20 61 63 74 69 6f 6e 2e | further| action.|
|00004da0| 0d 09 20 2a 09 43 50 6f | 6e 20 77 61 73 20 73 65 |.. *.CPo|n was se|
|00004db0| 74 20 69 6e 69 74 69 61 | 6c 6c 79 20 62 79 20 74 |t initia|lly by t|
|00004dc0| 68 65 20 65 78 74 65 6e | 73 69 6f 6e 20 62 61 73 |he exten|sion bas|
|00004dd0| 65 64 20 6f 6e 20 61 20 | 76 61 6c 75 65 20 69 6e |ed on a |value in|
|00004de0| 20 74 68 65 0d 09 20 2a | 09 70 72 65 66 65 72 65 | the.. *|.prefere|
|00004df0| 6e 63 65 73 20 72 65 73 | 6f 75 72 63 65 2e 20 20 |nces res|ource. |
|00004e00| 49 74 20 6d 61 79 20 6c | 61 74 65 72 20 68 61 76 |It may l|ater hav|
|00004e10| 65 20 62 65 65 6e 20 6d | 6f 64 69 66 69 65 64 20 |e been m|odified |
|00004e20| 62 79 20 74 68 65 20 6f | 6e 2f 6f 66 66 0d 09 20 |by the o|n/off.. |
|00004e30| 2a 09 73 65 74 74 69 6e | 67 20 69 6e 20 74 68 65 |*.settin|g in the|
|00004e40| 20 63 6f 6e 74 72 6f 6c | 20 70 61 6e 65 6c 2e 0d | control| panel..|
|00004e50| 09 20 2a 0d 09 20 2a 09 | 48 65 72 65 2c 20 77 65 |. *.. *.|Here, we|
|00004e60| 20 70 72 6f 63 65 73 73 | 20 74 68 65 20 65 76 65 | process| the eve|
|00004e70| 6e 74 20 61 6e 64 20 63 | 68 65 63 6b 20 74 6f 20 |nt and c|heck to |
|00004e80| 73 65 65 20 69 66 20 69 | 74 20 77 69 6c 6c 20 62 |see if i|t will b|
|00004e90| 65 0d 09 20 2a 09 69 6e | 74 65 72 63 65 70 74 65 |e.. *.in|tercepte|
|00004ea0| 64 20 62 79 20 63 61 6c | 6c 69 6e 67 20 74 68 65 |d by cal|ling the|
|00004eb0| 20 4d 79 45 76 74 48 61 | 6e 64 6c 65 72 20 72 6f | MyEvtHa|ndler ro|
|00004ec0| 75 74 69 6e 65 2e 20 20 | 4f 75 72 20 72 65 74 75 |utine. |Our retu|
|00004ed0| 72 6e 20 76 61 6c 75 65 | 20 69 73 20 62 61 73 65 |rn value| is base|
|00004ee0| 64 0d 09 20 2a 09 6f 6e | 20 74 68 65 20 72 65 74 |d.. *.on| the ret|
|00004ef0| 75 72 6e 20 76 61 6c 75 | 65 20 6f 66 20 4d 79 45 |urn valu|e of MyE|
|00004f00| 76 74 48 61 6e 64 6c 65 | 72 2e 0d 09 20 2a 2f 0d |vtHandle|r... */.|
|00004f10| 09 0d 09 09 69 66 20 28 | 20 6d 79 44 61 74 61 2e |....if (| myData.|
|00004f20| 43 50 6f 6e 20 29 0d 09 | 09 7b 0d 09 09 09 6c 6f |CPon )..|.{....lo|
|00004f30| 6e 67 09 6f 6c 64 41 35 | 3b 0d 09 09 09 0d 09 09 |ng.oldA5|;.......|
|00004f40| 09 2f 2a 20 4d 61 6b 65 | 20 73 75 72 65 20 74 68 |./* Make| sure th|
|00004f50| 65 20 41 35 20 72 65 67 | 69 73 74 65 72 20 68 6f |e A5 reg|ister ho|
|00004f60| 6c 64 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |lds the |current |
|00004f70| 61 70 70 27 73 20 63 6f | 72 72 65 63 74 20 2a 2f |app's co|rrect */|
|00004f80| 0d 09 09 09 2f 2a 20 41 | 35 20 77 6f 72 6c 64 20 |..../* A|5 world |
|00004f90| 76 61 6c 75 65 2c 20 61 | 6e 64 20 73 61 76 65 20 |value, a|nd save |
|00004fa0| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 76 61 6c |the prev|ious val|
|00004fb0| 75 65 2e 20 2a 2f 0d 09 | 09 09 0d 09 09 09 09 6f |ue. */..|.......o|
|00004fc0| 6c 64 41 35 20 3d 20 53 | 65 74 43 75 72 72 65 6e |ldA5 = S|etCurren|
|00004fd0| 74 41 35 28 29 3b 0d 09 | 09 09 09 0d 09 09 09 2f |tA5();..|......./|
|00004fe0| 2f 20 43 61 6c 6c 20 4d | 79 45 76 74 48 61 6e 64 |/ Call M|yEvtHand|
|00004ff0| 6c 65 72 20 74 6f 20 70 | 72 6f 63 65 73 73 20 74 |ler to p|rocess t|
|00005000| 68 65 20 65 76 65 6e 74 | 2e 20 20 49 66 20 4d 79 |he event|. If My|
|00005010| 45 76 74 48 61 6e 64 6c | 65 72 20 72 65 74 75 72 |EvtHandl|er retur|
|00005020| 6e 73 0d 09 09 09 2f 2f | 20 74 72 75 65 2c 20 74 |ns....//| true, t|
|00005030| 68 65 6e 20 77 65 27 6c | 6c 20 72 65 74 75 72 6e |hen we'l|l return|
|00005040| 20 74 72 75 65 20 73 6f | 20 74 68 61 74 20 74 68 | true so| that th|
|00005050| 65 20 65 76 65 6e 74 20 | 69 73 0d 09 09 09 2f 2f |e event |is....//|
|00005060| 20 22 69 6e 74 65 72 63 | 65 70 74 65 64 2e 22 20 | "interc|epted." |
|00005070| 20 54 68 69 73 20 63 61 | 75 73 65 73 20 57 4e 45 | This ca|uses WNE|
|00005080| 2f 47 4e 45 20 74 6f 20 | 72 65 74 75 72 6e 20 66 |/GNE to |return f|
|00005090| 61 6c 73 65 20 28 62 61 | 73 69 63 61 6c 6c 79 0d |alse (ba|sically.|
|000050a0| 09 09 09 2f 2f 20 61 20 | 4e 55 4c 4c 20 65 76 65 |...// a |NULL eve|
|000050b0| 6e 74 2e 20 20 49 66 20 | 4d 79 45 76 74 48 61 6e |nt. If |MyEvtHan|
|000050c0| 64 6c 65 72 20 72 65 74 | 75 72 6e 73 20 66 61 6c |dler ret|urns fal|
|000050d0| 73 65 2c 20 74 68 65 6e | 20 77 65 27 6c 6c 20 61 |se, then| we'll a|
|000050e0| 6c 73 6f 0d 09 09 09 2f | 2f 20 72 65 74 75 72 6e |lso..../|/ return|
|000050f0| 20 66 61 6c 73 65 20 61 | 6e 64 20 74 68 65 20 65 | false a|nd the e|
|00005100| 76 65 6e 74 20 69 73 20 | 72 65 74 75 72 6e 65 64 |vent is |returned|
|00005110| 20 74 6f 20 74 68 65 20 | 63 61 6c 6c 69 6e 67 0d | to the |calling.|
|00005120| 09 09 09 2f 2f 20 61 70 | 70 6c 69 63 61 74 69 6f |...// ap|plicatio|
|00005130| 6e 20 61 73 20 61 20 72 | 65 61 6c 20 65 76 65 6e |n as a r|eal even|
|00005140| 74 2e 0d 09 09 09 0d 09 | 09 09 09 69 6e 74 65 72 |t.......|...inter|
|00005150| 63 65 70 74 20 3d 20 4d | 79 45 76 74 48 61 6e 64 |cept = M|yEvtHand|
|00005160| 6c 65 72 28 20 65 76 65 | 6e 74 20 29 3b 0d 09 09 |ler( eve|nt );...|
|00005170| 09 0d 09 09 09 2f 2a 20 | 52 65 73 74 6f 72 65 20 |...../* |Restore |
|00005180| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 41 35 20 |the prev|ious A5 |
|00005190| 76 61 6c 75 65 20 2a 2f | 0d 09 09 09 0d 09 09 09 |value */|........|
|000051a0| 09 53 65 74 41 35 28 20 | 6f 6c 64 41 35 20 29 3b |.SetA5( |oldA5 );|
|000051b0| 0d 09 20 09 7d 0d 09 20 | 72 65 74 75 72 6e 20 69 |.. .}.. |return i|
|000051c0| 6e 74 65 72 63 65 70 74 | 3b 0d 7d 0d 0d 23 69 6e |ntercept|;.}..#in|
|000051d0| 63 6c 75 64 65 20 22 53 | 68 6f 77 49 63 6f 6e 46 |clude "S|howIconF|
|000051e0| 61 6d 69 6c 79 2e 63 22 | 0d 0d 23 69 6e 63 6c 75 |amily.c"|..#inclu|
|000051f0| 64 65 20 22 4d 79 45 76 | 74 48 61 6e 64 6c 65 72 |de "MyEv|tHandler|
|00005200| 2e 63 22 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c".....|........|
|00005210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005280| 00 00 01 00 00 00 01 84 | 00 00 00 84 00 00 00 3e |........|.......>|
|00005290| 00 00 00 00 03 00 00 00 | 00 00 00 00 04 ff ff ff |........|........|
|000052a0| ff ff ff 00 00 00 30 00 | 00 00 00 00 00 00 04 00 |......0.|........|
|000052b0| 08 4d 79 4a 47 4e 45 2e | 63 00 02 00 00 00 50 61 |.MyJGNE.|c.....Pa|
|000052c0| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 00 |rtSITx..|........|
|000052d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 aa da 77 d3 00 00 | 00 00 00 00 01 c2 01 00 |....w...|........|
|00005300| 01 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005310| 00 00 04 00 00 00 00 00 | 0c 00 18 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 0c 00 | 18 00 00 00 00 ff ff ff |........|........|
|00005330| 00 ff ff ff 00 ff ff ff | 00 ff ff ff 00 ff ff ff |........|........|
|00005340| 00 ff ff ff 00 ff ff ff | 00 ff ff ff 00 ff ff ff |........|........|
|00005350| 00 ff ff ff 00 ff ff ff | 00 ff ff ff 00 00 00 00 |........|........|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 34 00 03 00 00 | 22 19 00 00 22 19 09 66 |...4....|"..."..f|
|00005390| 75 6e 63 74 69 6f 6e 73 | 00 00 1e 41 00 00 1e 41 |unctions|...A...A|
|000053a0| 07 67 6c 6f 62 61 6c 73 | 00 00 18 e2 00 00 18 e2 |.globals|........|
|000053b0| 07 68 65 61 64 65 72 73 | 00 00 00 48 00 09 4d 6f |.headers|...H..Mo|
|000053c0| 6e 61 63 6f 00 00 00 00 | 00 00 00 00 00 00 00 00 |naco....|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 06 |........|........|
|000053e0| 00 04 00 2a 00 03 01 dd | 02 7d 00 38 00 14 01 d6 |...*....|.}.8....|
|000053f0| 02 40 aa b0 bb f2 00 00 | 46 a6 00 00 46 a6 00 00 |.@......|F...F...|
|00005400| 00 00 00 00 00 00 01 00 | 00 00 01 84 00 00 00 84 |........|........|
|00005410| 00 00 00 3e 00 a5 3f 38 | 10 88 00 00 00 1c 00 3e |...>..?8|.......>|
|00005420| 00 00 4d 50 53 52 00 01 | 00 0a 03 ef ff ff 00 00 |..MPSR..|........|
|00005430| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 38 00 a5 |........|.....8..|
|00005440| 3d dc 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |=.......|........|
|00005450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+